refactor: topic creation to use api lib

This commit is contained in:
Julian Lam
2020-10-16 10:34:37 -04:00
parent b6cce75d97
commit 40598b368e
8 changed files with 24 additions and 54 deletions

View File

@@ -191,7 +191,7 @@ SocketHelpers.rescindUpvoteNotification = async function (pid, fromuid) {
websockets.in('uid_' + uid).emit('event:notifications.updateCount', count);
};
SocketHelpers.emitToTopicAndCategory = async function (event, data, uids) {
SocketHelpers.emitToUids = async function (event, data, uids) {
uids.forEach(toUid => websockets.in('uid_' + toUid).emit(event, data));
};