Update DM channel on entity updates.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using Model = Discord.API.User;
|
||||
using PresenceModel = Discord.API.Presence;
|
||||
|
||||
@@ -51,6 +52,7 @@ namespace Discord.WebSocket
|
||||
internal void Update(ClientState state, PresenceModel model)
|
||||
{
|
||||
Presence = SocketPresence.Create(model);
|
||||
DMChannel = state.DMChannels.FirstOrDefault(x => x.Recipient.Id == Id);
|
||||
}
|
||||
|
||||
internal new SocketGlobalUser Clone() => MemberwiseClone() as SocketGlobalUser;
|
||||
|
||||
Reference in New Issue
Block a user