Browse Source

Merge 7f880806f2 into 6b5a6e7f1f

pull/751/merge
Christopher F GitHub 8 years ago
parent
commit
6662018ec1
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/Discord.Net.WebSocket/DiscordSocketClient.cs

+ 3
- 1
src/Discord.Net.WebSocket/DiscordSocketClient.cs View File

@@ -1631,7 +1631,9 @@ namespace Discord.WebSocket


internal ISocketPrivateChannel AddPrivateChannel(API.Channel model, ClientState state) internal ISocketPrivateChannel AddPrivateChannel(API.Channel model, ClientState state)
{ {
var channel = SocketChannel.CreatePrivate(this, state, model);
if (state.GetChannel(model.Id) is ISocketPrivateChannel channel)
return channel;
channel = SocketChannel.CreatePrivate(this, state, model);
state.AddChannel(channel as SocketChannel); state.AddChannel(channel as SocketChannel);
if (channel is SocketDMChannel dm) if (channel is SocketDMChannel dm)
dm.Recipient.GlobalUser.DMChannel = dm; dm.Recipient.GlobalUser.DMChannel = dm;


Loading…
Cancel
Save