Node.js based forum software built for the modern web
fix: merged user flag notifications show the flagged user (#14864)
palmoni5e3cddfbc7a32
diff --git a/src/flags.js b/src/flags.jsindex 873161cea2..0b78eaf975 100644--- a/src/flags.js+++ b/src/flags.js@@ -1010,6 +1010,7 @@ Flags.notify = async function (flagObj, uid, notifySelf = false) {nid: `flag:user:${flagObj.targetId}:${uid}`,from: uid,mergeId: `notifications:user-flagged-user|${flagObj.targetId}`,+ targetDisplayname: targetDisplayname,});} else if (flagObj.type === 'message') {const roomId = await messaging.getRoomIdByMid(flagObj.targetId);diff --git a/src/notifications.js b/src/notifications.jsindex 14b6bee21f..673dd2f9c2 100644--- a/src/notifications.js+++ b/src/notifications.js@@ -570,11 +570,16 @@ Notifications.merge = async function (notifications) {]);break;}+ case 'notifications:user-flagged-user': {+ buildMergedNotif(mergeId, notifObj, set, [+ tx.escape(notifObj.targetDisplayname),+ ]);+ break;+ }case 'notifications:upvoted-your-post-in':case 'notifications:user-started-following-you':case 'notifications:user-posted-to':case 'notifications:user-flagged-post-in':- case 'notifications:user-flagged-user':case 'notifications:activitypub.announce': {buildMergedNotif(mergeId, notifObj, set, [tx.escape(notifObj.topicTitle),