diff --git a/modules/users/users.js b/modules/users/users.js index 524be1e..3fdab59 100644 --- a/modules/users/users.js +++ b/modules/users/users.js @@ -123,8 +123,10 @@ var users = function(dbot) { channel.users.push(result.id); }.bind(this)); } else { - if(!_.include(user.channels, event.channel)) { + if(!_.include(user.channels, event.channel.name)) { channel.users.push(user.id); + user.channels.push(event.channel.name); + this.db.save('users', user.id, user, function(err) { }); } } }.bind(this));