mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
prettified an object
This commit is contained in:
parent
fb5de522e5
commit
9d23898018
1 changed files with 9 additions and 2 deletions
|
|
@ -38,10 +38,17 @@
|
||||||
|
|
||||||
Channel.prototype.onAddUser = function (userId) {
|
Channel.prototype.onAddUser = function (userId) {
|
||||||
var user = new User(userId, this);
|
var user = new User(userId, this);
|
||||||
var othersJoined = Object.keys(this.users);
|
var others = Object.keys(this.users);
|
||||||
|
|
||||||
this.users[user.id] = user;
|
this.users[user.id] = user;
|
||||||
NotificationCenter.trigger('user/' + user.id + "/joinSuccess", {userId: user.id, channelName: this.name, others: othersJoined});
|
|
||||||
|
var options = {
|
||||||
|
userId: user.id,
|
||||||
|
channelName: this.name,
|
||||||
|
others: others
|
||||||
|
};
|
||||||
|
|
||||||
|
NotificationCenter.trigger('user/' + user.id + "/joinSuccess", options);
|
||||||
NotificationCenter.trigger('user/joined', user);
|
NotificationCenter.trigger('user/joined', user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue