v1.18.x
Barış Soner Uşaklı 7 years ago
parent 113fed05d8
commit df770aed8e

@ -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"
}

@ -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 + ']]',

Loading…
Cancel
Save