Skip to content

Node.js based forum software built for the modern web

feat: award notif filter

Barış Soner Uşaklı9e9046bf65ac
diff --git a/public/language/en-GB/notifications.json b/public/language/en-GB/notifications.json
index 9d75199c4f..8670874814 100644
--- a/public/language/en-GB/notifications.json
+++ b/public/language/en-GB/notifications.json
@@ -21,6 +21,7 @@
"public-chat": "Public Chats",
"follows": "Follows",
"upvote": "Upvotes",
+ "awards": "Awards",
"new-flags": "New Flags",
"my-flags": "Flags assigned to me",
"bans": "Bans",
@@ -100,5 +101,6 @@
"notificationType-new-register": "When someone gets added to registration queue",
"notificationType-post-queue": "When a new post is queued",
"notificationType-new-post-flag": "When a post is flagged",
- "notificationType-new-user-flag": "When a user is flagged"
+ "notificationType-new-user-flag": "When a user is flagged",
+ "notificationType-new-reward": "When you earn a new reward"
}
diff --git a/src/controllers/accounts/notifications.js b/src/controllers/accounts/notifications.js
index ac983dd0e4..fd5ce2529c 100644
--- a/src/controllers/accounts/notifications.js
+++ b/src/controllers/accounts/notifications.js
@@ -18,6 +18,7 @@ notificationsController.get = async function (req, res, next) {
{ name: '[[notifications:public-chat]]', filter: 'new-public-chat' },
{ name: '[[notifications:follows]]', filter: 'follow' },
{ name: '[[notifications:upvote]]', filter: 'upvote' },
+ { name: '[[notifications:awards]]', filter: 'new-reward' },
];
const moderatorFilters = [
diff --git a/src/notifications.js b/src/notifications.js
index 13f81337a9..681c293067 100644
--- a/src/notifications.js
+++ b/src/notifications.js
@@ -40,6 +40,7 @@ Notifications.baseTypes = [
'notificationType_group-invite',
'notificationType_group-leave',
'notificationType_group-request-membership',
+ 'notificationType_new-reward',
];
Notifications.privilegedTypes = [