mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-07 06:25:50 +01:00
closes #2074
when new notifications are pushed to uids clear their old notifications.
This commit is contained in:
@@ -141,6 +141,10 @@ var async = require('async'),
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
var oneWeekAgo = Date.now() - 604800000;
|
||||
db.sortedSetsRemoveRangeByScore(unreadKeys, 0, oneWeekAgo);
|
||||
db.sortedSetsRemoveRangeByScore(readKeys, 0, oneWeekAgo);
|
||||
|
||||
plugins.fireHook('action:notification.pushed', {notification: notification, uids: uids});
|
||||
|
||||
for(var i=0; i<uids.length; ++i) {
|
||||
|
||||
Reference in New Issue
Block a user