Browse Source

Fix invoking reaction events twice

tags/1.0-rc
Christopher F 8 years ago
parent
commit
676fbbcd23
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/Discord.Net.WebSocket/DiscordSocketClient.cs

+ 2
- 0
src/Discord.Net.WebSocket/DiscordSocketClient.cs View File

@@ -1318,6 +1318,7 @@ namespace Discord.WebSocket
{
cachedMsg.AddReaction(reaction);
await _reactionAddedEvent.InvokeAsync(data.MessageId, cachedMsg, reaction).ConfigureAwait(false);
return;
}
await _reactionAddedEvent.InvokeAsync(data.MessageId, Optional.Create<SocketUserMessage>(), reaction).ConfigureAwait(false);
}
@@ -1342,6 +1343,7 @@ namespace Discord.WebSocket
{
cachedMsg.RemoveReaction(reaction);
await _reactionRemovedEvent.InvokeAsync(data.MessageId, cachedMsg, reaction).ConfigureAwait(false);
return;
}
await _reactionRemovedEvent.InvokeAsync(data.MessageId, Optional.Create<SocketUserMessage>(), reaction).ConfigureAwait(false);
}


Loading…
Cancel
Save