3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-24 04:49:25 +01:00

additional channels are added to user records from 366 event [#331]

This commit is contained in:
reality 2013-04-21 14:17:29 +00:00
parent 0d76ce4166
commit 5aaa9f8856

View File

@ -123,8 +123,10 @@ var users = function(dbot) {
channel.users.push(result.id); channel.users.push(result.id);
}.bind(this)); }.bind(this));
} else { } else {
if(!_.include(user.channels, event.channel)) { if(!_.include(user.channels, event.channel.name)) {
channel.users.push(user.id); channel.users.push(user.id);
user.channels.push(event.channel.name);
this.db.save('users', user.id, user, function(err) { });
} }
} }
}.bind(this)); }.bind(this));