|
|
|
@ -7,6 +7,7 @@ var RDB = require('./redis.js')
|
|
|
|
|
posts = require('./posts.js'),
|
|
|
|
|
threadTools = require('./threadTools.js'),
|
|
|
|
|
postTools = require('./postTools'),
|
|
|
|
|
Notifications = require('./notifications'),
|
|
|
|
|
async = require('async'),
|
|
|
|
|
feed = require('./feed.js'),
|
|
|
|
|
favourites = require('./favourites.js'),
|
|
|
|
@ -511,6 +512,14 @@ var RDB = require('./redis.js')
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
user.notifications.getUnreadByUniqueId(uid, 'topic:' + tid, function(err, nids) {
|
|
|
|
|
if (nids.length > 0) {
|
|
|
|
|
async.each(nids, function(nid, next) {
|
|
|
|
|
Notifications.mark_read(nid, uid, next);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Topics.hasReadTopics = function(tids, uid, callback) {
|
|
|
|
|