fix: MessageUpdated without author (#1858)
This commit is contained in:
@@ -1359,6 +1359,8 @@ namespace Discord.WebSocket
|
||||
{
|
||||
//Edited message isnt in cache, create a detached one
|
||||
SocketUser author;
|
||||
if (data.Author.IsSpecified)
|
||||
{
|
||||
if (guild != null)
|
||||
{
|
||||
if (data.WebhookId.IsSpecified)
|
||||
@@ -1389,6 +1391,10 @@ namespace Discord.WebSocket
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
// Message author wasn't specified in the payload, so create a completely anonymous unknown user
|
||||
author = new SocketUnknownUser(this, id: 0);
|
||||
|
||||
after = SocketMessage.Create(this, State, author, channel, data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user