mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 22:15:48 +01:00
interim commit
This commit is contained in:
@@ -30,6 +30,7 @@ var RDB = require('./redis.js'),
|
||||
* the new one put in its place.
|
||||
*/
|
||||
RDB.incr('notifications:next_nid', function(err, nid) {
|
||||
RDB.sadd('notifications', nid);
|
||||
RDB.hmset('notifications:' + nid, {
|
||||
text: text || '',
|
||||
path: path || null,
|
||||
@@ -124,6 +125,14 @@ var RDB = require('./redis.js'),
|
||||
});
|
||||
} else callback();
|
||||
});
|
||||
},
|
||||
prune: function(cutoff, callback) {
|
||||
var today = new Date();
|
||||
if (!cutoff || !(cutoff instanceof Date)) cutoff = new Date(today.getFullYear(), today.getMonth(), today.getDate() - 7);
|
||||
|
||||
RDB.smembers('notifications', function(err, nids) {
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user