feat: add tools to recent/unread (#8477)

* feat: add tools to recent/unread

* fix: open api spec

* fix: more api spec
This commit is contained in:
Barış Soner Uşaklı
2020-07-08 14:09:10 -04:00
committed by GitHub
parent 14eafcb6b8
commit 658dd03b03
16 changed files with 139 additions and 50 deletions

View File

@@ -191,9 +191,8 @@ SocketHelpers.rescindUpvoteNotification = async function (pid, fromuid) {
websockets.in('uid_' + uid).emit('event:notifications.updateCount', count);
};
SocketHelpers.emitToTopicAndCategory = function (event, data) {
websockets.in('topic_' + data.tid).emit(event, data);
websockets.in('category_' + data.cid).emit(event, data);
SocketHelpers.emitToTopicAndCategory = async function (event, data, uids) {
uids.forEach(toUid => websockets.in('uid_' + toUid).emit(event, data));
};
require('../promisify')(SocketHelpers);