Sorry, yet another question related to REMOTE_DISPATCH / auth.
So, we’re using URLs of the form
http://<somplace>/wroom/auth/<user>
to enter a waiting room that uses REMOTE_DISPATCH to pass along a user
identifier, <user>. Since <user> is passed along to the
REMOTE_DISPATCH prepocess() function I can pass it along to the target
of the redirection. But if the user times out in the waiting room we’d
like to make a record of who it was that timed out, so we can at least
pay them for their wasted waiting time. I’ve tried the following:
| ON_TIMEOUT: function() {
| // TODO how do I get the full URL that sent us here so I can
pull out the user id?
| node.say('NOGROUP', 'SERVER', window.location.href);
| },
|
| ON_INIT: function(wr) {
| this.node.on.data('NOGROUP', function(msg) {
| fs.appendFileSync("games/wroom/waiting_room.csv",
| `"${msg.data.replace(/"/g, '""')}",${new
Date()},no group formed\n`);
| });
| },
But it appears window.location.href has the “/auth/<user>” stripped
away; that is, it’s just:
http://<someplace>/wroom
Any idea how I can get the <user> in this context?
Thanks!
--
Don Morrison <
d...@ringing.org>
“Behavioral science is not for sissies.”
— Steven Pinker, /The Blank Slate/