Timothy Fike 9 years ago committed by GitHub
parent d4d36d2c8b
commit fe3fbb7197

@ -4,6 +4,7 @@
var async = require('async');
var db = require('../database');
var plugins = require('../plugins');
module.exports = function(Topics) {
var terms = {
@ -63,6 +64,10 @@ module.exports = function(Topics) {
Topics.updateRecent = function(tid, timestamp, callback) {
callback = callback || function() {};
db.sortedSetAdd('topics:recent', timestamp, tid, callback);
if (plugins.hasListeners('filter:topics.updateRecent')) {
plugins.fireHook('filter:topics.updateRecent', {tid: tid, timestamp: timestamp}, callback);
} else {
db.sortedSetAdd('topics:recent', timestamp, tid, callback);
}
};
};

Loading…
Cancel
Save