-moved user.blocks.filter from unread controller to getUnreadTopics so
topics are filtered at other places this function is called
- when a new post is made do not send it to uids that have blocked the
poster
- update getUnreadTids so it does not return topics that have new posts
from blocked users
- update hasReadTopics so it does not return false data if topic has new
posts from blocked users
This commit is contained in:
Barış Soner Uşaklı
2018-09-14 16:23:16 -04:00
parent 0c9907367a
commit b43bfa3d5b
3 changed files with 62 additions and 13 deletions

View File

@@ -31,6 +31,9 @@ SocketHelpers.notifyNew = function (uid, type, result) {
function (uids, next) {
filterTidCidIgnorers(uids, result.posts[0].topic.tid, result.posts[0].topic.cid, next);
},
function (uids, next) {
user.blocks.filterUids(uid, uids, next);
},
function (uids, next) {
plugins.fireHook('filter:sockets.sendNewPostToUids', { uidsTo: uids, uidFrom: uid, type: type }, next);
},