From 459020eab74230990d86d72f902b4dcc0b60006d Mon Sep 17 00:00:00 2001 From: Nils <7890309+DarkView@users.noreply.github.com> Date: Wed, 12 May 2021 01:32:29 +0200 Subject: [PATCH] Allow target user to be mentioned in channels (#215) --- backend/src/utils.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/src/utils.ts b/backend/src/utils.ts index e3f3fdaf..74e5c4a2 100644 --- a/backend/src/utils.ts +++ b/backend/src/utils.ts @@ -1011,7 +1011,10 @@ export async function notifyUser( } } else if (method.type === "channel") { try { - await method.channel.createMessage(`<@!${user.id}> ${body}`); + await method.channel.createMessage({ + content: `<@!${user.id}> ${body}`, + allowedMentions: { users: [user.id] }, + }); return { method, success: true,