refactored chat notification system to wait a bit before sending notif/email, closes #2098

This commit is contained in:
Julian Lam
2014-09-16 13:27:26 -04:00
parent 451c5b40fd
commit b85ff61de6
5 changed files with 61 additions and 23 deletions

View File

@@ -146,6 +146,7 @@ var async = require('async'),
db.sortedSetsRemoveRangeByScore(readKeys, 0, oneWeekAgo);
plugins.fireHook('action:notification.pushed', {notification: notification, uids: uids});
callback();
for(var i=0; i<uids.length; ++i) {
websockets.in('uid_' + uids[i]).emit('event:new_notification', notification);