This commit is contained in:
reality 2015-12-09 20:11:33 +00:00
parent 890103e4ab
commit eb35db1074

View File

@ -30,7 +30,7 @@ var tell = function(dbot) {
} }
tells[user.id].push({ tells[user.id].push({
'channel': event.channel, 'channel': event.channel.name,
'message': event.message, 'message': event.message,
'from': event.user 'from': event.user
}); // i feel like i'm data structure challenged today }); // i feel like i'm data structure challenged today
@ -47,7 +47,7 @@ var tell = function(dbot) {
if(_.has(tells, event.rUser.id)) { if(_.has(tells, event.rUser.id)) {
var done = []; var done = [];
_.each(tells[event.rUser.id], function(tell, i) { _.each(tells[event.rUser.id], function(tell, i) {
if(event.channel == tell.channel) { if(event.channel.name == tell.channel) {
event.reply('Dear ' + event.user + ', ' + tell.from + ' left you a message: ' + tell.message); event.reply('Dear ' + event.user + ', ' + tell.from + ' left you a message: ' + tell.message);
tells[event.rUser.id].splice(i, 1); tells[event.rUser.id].splice(i, 1);
} }