From 425efe1fe4b8d679e0a8b1ab24c52345bb78b127 Mon Sep 17 00:00:00 2001 From: SpaceEEC Date: Wed, 30 Aug 2017 02:15:24 +0200 Subject: [PATCH] Consistently store message reactions keyed under their unicode (#1852) --- src/structures/Message.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structures/Message.js b/src/structures/Message.js index 1110513b1..ce83c63a9 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -536,7 +536,7 @@ class Message { } _addReaction(emoji, user) { - const emojiID = emoji.id ? `${emoji.name}:${emoji.id}` : encodeURIComponent(emoji.name); + const emojiID = emoji.id ? `${emoji.name}:${emoji.id}` : emoji.name; let reaction; if (this.reactions.has(emojiID)) { reaction = this.reactions.get(emojiID); @@ -553,7 +553,7 @@ class Message { } _removeReaction(emoji, user) { - const emojiID = emoji.id ? `${emoji.name}:${emoji.id}` : encodeURIComponent(emoji.name); + const emojiID = emoji.id ? `${emoji.name}:${emoji.id}` : emoji.name; if (this.reactions.has(emojiID)) { const reaction = this.reactions.get(emojiID); if (reaction.users.has(user.id)) {