mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 18:46:01 +01:00
checks
This commit is contained in:
@@ -89,7 +89,9 @@ SocketTopics.markAsRead = function(socket, tids, callback) {
|
||||
if (!tids.length) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
tids = tids.filter(function(tid) {
|
||||
return tid && utils.isNumber(tid);
|
||||
});
|
||||
topics.markAsRead(tids, socket.uid, function(err) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
|
||||
@@ -206,6 +206,9 @@ module.exports = function(Topics) {
|
||||
};
|
||||
|
||||
Topics.markTopicNotificationsRead = function(tid, uid) {
|
||||
if (!tid) {
|
||||
return;
|
||||
}
|
||||
user.notifications.getUnreadByField(uid, 'tid', tid, function(err, nids) {
|
||||
if (err) {
|
||||
return winston.error(err.stack);
|
||||
|
||||
Reference in New Issue
Block a user