|
|
@ -807,9 +807,10 @@ Flags.notify = async function (flagObj, uid, notifySelf = false) {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
uids = uids.concat(modUids[0]);
|
|
|
|
uids = uids.concat(modUids[0]);
|
|
|
|
} else if (flagObj.type === 'user') {
|
|
|
|
} else if (flagObj.type === 'user') {
|
|
|
|
|
|
|
|
const targetDisplayname = flagObj.target && flagObj.target.user ? flagObj.target.user.displayname : '[[global:guest]]';
|
|
|
|
notifObj = await notifications.create({
|
|
|
|
notifObj = await notifications.create({
|
|
|
|
type: 'new-user-flag',
|
|
|
|
type: 'new-user-flag',
|
|
|
|
bodyShort: `[[notifications:user_flagged_user, ${displayname}, ${flagObj.target.user.displayname}]]`,
|
|
|
|
bodyShort: `[[notifications:user_flagged_user, ${displayname}, ${targetDisplayname}]]`,
|
|
|
|
bodyLong: await plugins.hooks.fire('filter:parse.raw', String(flagObj.description || '')),
|
|
|
|
bodyLong: await plugins.hooks.fire('filter:parse.raw', String(flagObj.description || '')),
|
|
|
|
path: `/flags/${flagObj.flagId}`,
|
|
|
|
path: `/flags/${flagObj.flagId}`,
|
|
|
|
nid: `flag:user:${flagObj.targetId}`,
|
|
|
|
nid: `flag:user:${flagObj.targetId}`,
|
|
|
|