Skip to content

Commit

Permalink
omfg that's an I/O operation in ctor bruh
Browse files Browse the repository at this point in the history
  • Loading branch information
Misha-133 committed Dec 4, 2024
1 parent 28e05cd commit a219f6d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Discord.Net.WebSocket/Entities/Messages/SocketMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@ internal virtual void Update(ClientState state, Model model)
var val = value[i];
if (val != null)
{
var user = Channel.GetUserAsync(val.Id, CacheMode.CacheOnly).GetAwaiter().GetResult() as SocketUser;
// TODO: this is cursed af and should be yeeted
var user = Channel?.GetUserAsync(val.Id, CacheMode.CacheOnly).GetAwaiter().GetResult() as SocketUser;
if (user != null)
newMentions.Add(user);
else
Expand Down

0 comments on commit a219f6d

Please sign in to comment.