From 5aaa9f8856264a05f7f9756ebfe01c6eb284d484 Mon Sep 17 00:00:00 2001 From: reality Date: Sun, 21 Apr 2013 14:17:29 +0000 Subject: [PATCH] additional channels are added to user records from 366 event [#331] --- modules/users/users.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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));