mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
closes #4583
This commit is contained in:
@@ -81,6 +81,21 @@ var plugins = require('./plugins');
|
||||
});
|
||||
};
|
||||
|
||||
Notifications.filterExists = function(nids, callback) {
|
||||
// Removes nids that have been pruned
|
||||
db.isSortedSetMembers('notifications', nids, function(err, exists) {
|
||||
if (err) {
|
||||
return callbacK(err);
|
||||
}
|
||||
|
||||
nids = nids.filter(function(notifId, idx) {
|
||||
return exists[idx];
|
||||
});
|
||||
|
||||
callback(null, nids);
|
||||
});
|
||||
};
|
||||
|
||||
Notifications.findRelated = function(mergeIds, set, callback) {
|
||||
// A related notification is one in a zset that has the same mergeId
|
||||
var _nids;
|
||||
|
||||
Reference in New Issue
Block a user