From df770aed8e7accd0974ed66cdf73851c7dfa6914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 2 Apr 2018 12:48:22 -0400 Subject: [PATCH] closes #6416 --- install/data/defaults.json | 6 +++++- src/controllers/admin/settings.js | 11 +++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/install/data/defaults.json b/install/data/defaults.json index cecf4d8a38..93850b9c01 100644 --- a/install/data/defaults.json +++ b/install/data/defaults.json @@ -46,5 +46,9 @@ "notificationType_follow": "notification", "notificationType_new-chat": "notification", "notificationType_group-invite": "notification", - "notificationType_mention": "notification" + "notificationType_mention": "notification", + "notificationType_new-register": "notification", + "notificationType_post-queue": "notification", + "notificationType_new-post-flag": "notification", + "notificationType_new-user-flag": "notification" } diff --git a/src/controllers/admin/settings.js b/src/controllers/admin/settings.js index 81e902d0fd..678a9e4e8c 100644 --- a/src/controllers/admin/settings.js +++ b/src/controllers/admin/settings.js @@ -54,16 +54,23 @@ function renderUser(req, res, next) { 'notificationType_group-invite', ]; + var privilegedTypes = [ + 'notificationType_new-register', + 'notificationType_post-queue', + 'notificationType_new-post-flag', + 'notificationType_new-user-flag', + ]; + async.waterfall([ function (next) { plugins.fireHook('filter:user.notificationTypes', { userData: {}, types: types, - privilegedTypes: [], + privilegedTypes: privilegedTypes, }, next); }, function (results) { - var notificationSettings = results.types.map(function modifyType(type) { + var notificationSettings = results.types.concat(results.privilegedTypes).map(function (type) { return { name: type, label: '[[notifications:' + type + ']]',