forked from GitHub/dbot
~mergeusershook for notify
This commit is contained in:
parent
dfde53b8ac
commit
9a4111c393
@ -188,7 +188,14 @@ var report = function(dbot) {
|
||||
if(_.has(dbot.modules, 'web')) {
|
||||
dbot.api.web.addIndexLink('/notify', 'Notifications');
|
||||
}
|
||||
};
|
||||
|
||||
dbot.api.event.addHook('~mergeusers', function(server, oldUser, newUser) {
|
||||
this.db.search('notifies', { 'user': oldUser.id }, function(notify) {
|
||||
notify.user = newUser.id;
|
||||
this.db.save('notifies', notify.id, notify, function() {});
|
||||
}.bind(this), function() {});
|
||||
}.bind(this));
|
||||
}.bind(this);
|
||||
};
|
||||
|
||||
exports.fetch = function(dbot) {
|
||||
|
Loading…
Reference in New Issue
Block a user