public
Last active

  • Download Gist
now-iter.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
everyone.now.joinChat = function () {
this.now.inChat = true;
var userlist = [];
everyone.now.iterate(function (user) {
if (user.now.inChat) {
userlist.push(userId(user));
}
});
this.now.receiveUsers(userlist);
everyone.now.broadcastJoin(this);
}
 
everyone.now.iterate = function (callback) {
callback(this);
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.