mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 16:35:47 +01:00
Add notification frequencies from nodebb-plugin-upvote-notifications. (#6640)
* Add notification frequencies from nodebb-plugin-upvote-notifications. https://github.com/boomzillawtf/nodebb-plugin-upvote-notifications * Fix editing settings clearing upvote notification preferences.
This commit is contained in:
committed by
Barış Soner Uşaklı
parent
11258dac9c
commit
f1a6537fc2
@@ -186,9 +186,15 @@ SocketHelpers.upvote = function (data, notification) {
|
||||
all: function () {
|
||||
return votes > 0;
|
||||
},
|
||||
first: function () {
|
||||
return votes === 1;
|
||||
},
|
||||
everyTen: function () {
|
||||
return votes > 0 && votes % 10 === 0;
|
||||
},
|
||||
threshold: function () {
|
||||
return [1, 5, 10, 25].indexOf(votes) !== -1 || (votes >= 50 && votes % 50 === 0);
|
||||
},
|
||||
logarithmic: function () {
|
||||
return votes > 1 && Math.log10(votes) % 1 === 0;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user