Skip to content

Commit

Permalink
Fixed user object not being grabbed from cache (DSharpPlus#1229)
Browse files Browse the repository at this point in the history
  • Loading branch information
OoLunar authored Mar 7, 2022
1 parent b0054ad commit 900e704
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion DSharpPlus/Clients/DiscordClient.Dispatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1657,7 +1657,11 @@ internal async Task OnMessageReactionAddAsync(ulong userId, ulong messageId, ulo

emoji.Discord = this;

var usr = this.UpdateUser(new DiscordUser { Id = userId, Discord = this }, guildId, guild, mbr);
DiscordUser usr = null!;
if (!this.TryGetCachedUserInternal(userId, out usr))
{
usr = this.UpdateUser(new DiscordUser { Id = userId, Discord = this }, guildId, guild, mbr);
}

if (channel == null)
{
Expand Down

0 comments on commit 900e704

Please sign in to comment.