From 4c9171e72a6cb2005c229fb40f205154d2773a1e Mon Sep 17 00:00:00 2001 From: Ayyan Date: Tue, 19 Jan 2021 18:10:28 +0400 Subject: [PATCH] fix(handlers): support for custom emoji in reaction remove functions (#400) --- src/api/handlers/message.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/api/handlers/message.ts b/src/api/handlers/message.ts index 93a096fcc..cf02ff86e 100644 --- a/src/api/handlers/message.ts +++ b/src/api/handlers/message.ts @@ -152,6 +152,12 @@ export function removeReaction( messageID: string, reaction: string, ) { + if (reaction.startsWith("<:")) { + reaction = reaction.substring(2, reaction.length - 1); + } else if (reaction.startsWith("