Skip to content

Commit

Permalink
Fix _removeReaction's reaction lookup (#1045)
Browse files Browse the repository at this point in the history
* Fix _removeReaction's `this.reactions` lookup

* Use emoji.identifier for reaction collection keys
  • Loading branch information
fernozzle authored and Gawdl3y committed Dec 31, 2016
1 parent 054d465 commit 3b9b062
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/structures/Message.js
Expand Up @@ -535,7 +535,7 @@ class Message {
}

_addReaction(emoji, user) {
const emojiID = emoji.id ? `${emoji.name}:${emoji.id}` : emoji.name;
const emojiID = emoji.identifier;
let reaction;
if (this.reactions.has(emojiID)) {
reaction = this.reactions.get(emojiID);
Expand All @@ -553,7 +553,7 @@ class Message {
}

_removeReaction(emoji, user) {
const emojiID = emoji.id || emoji;
const emojiID = emoji.identifier;
if (this.reactions.has(emojiID)) {
const reaction = this.reactions.get(emojiID);
if (reaction.users.has(user.id)) {
Expand Down

0 comments on commit 3b9b062

Please sign in to comment.