mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-16 17:40:47 +01:00
Upvote notification frequency selection (#6087)
Closes #5963 - Notify on every upvote - Notify on every tenth upvote - Notify logarithmically (on 10, 100, 1000...) - Disable upvote notifications
This commit is contained in:
committed by
Julian Lam
parent
3fd25257e0
commit
74ceb78800
@@ -69,7 +69,9 @@ function executeCommand(socket, command, eventName, notification, data, callback
|
||||
websockets.in(data.room_id).emit('event:' + eventName, result);
|
||||
}
|
||||
|
||||
if (result && notification) {
|
||||
if (result && command === 'upvote') {
|
||||
socketHelpers.upvote(result, notification);
|
||||
} else if (result && notification) {
|
||||
socketHelpers.sendNotificationToPostOwner(data.pid, socket.uid, command, notification);
|
||||
} else if (result && command === 'unvote') {
|
||||
socketHelpers.rescindUpvoteNotification(data.pid, socket.uid);
|
||||
|
||||
Reference in New Issue
Block a user