From 17783440e4626d4a5d7423711d17c95190ade527 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Tue, 25 Jul 2023 10:24:18 -0400 Subject: [PATCH] fix: #11841, use unique nid per user who flagged if multiple users flag a post/user, the notifications are merged using mergeId. if they use the same nid they overwrite each other --- src/flags.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flags.js b/src/flags.js index 904f1f71dc..7a6c16233f 100644 --- a/src/flags.js +++ b/src/flags.js @@ -844,7 +844,7 @@ Flags.notify = async function (flagObj, uid, notifySelf = false) { bodyLong: await plugins.hooks.fire('filter:parse.raw', String(flagObj.description || '')), pid: flagObj.targetId, path: `/flags/${flagObj.flagId}`, - nid: `flag:post:${flagObj.targetId}`, + nid: `flag:post:${flagObj.targetId}:${uid}`, from: uid, mergeId: `notifications:user_flagged_post_in|${flagObj.targetId}`, topicTitle: title, @@ -857,7 +857,7 @@ Flags.notify = async function (flagObj, uid, notifySelf = false) { bodyShort: `[[notifications:user_flagged_user, ${displayname}, ${targetDisplayname}]]`, bodyLong: await plugins.hooks.fire('filter:parse.raw', String(flagObj.description || '')), path: `/flags/${flagObj.flagId}`, - nid: `flag:user:${flagObj.targetId}`, + nid: `flag:user:${flagObj.targetId}:${uid}`, from: uid, mergeId: `notifications:user_flagged_user|${flagObj.targetId}`, });