Skip to content

Commit

Permalink
fix(DMChannel): messages not being cached (#2122)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lewdcario authored and iCrawl committed Nov 21, 2017
1 parent cce2480 commit 22da595
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/client/ClientDataManager.js
Expand Up @@ -69,9 +69,10 @@ class ClientDataManager {
}
}

if (channel) {
if (this.pastReady && !already) this.client.emit(Constants.Events.CHANNEL_CREATE, channel);
if (channel && !already) {
if (this.pastReady) this.client.emit(Constants.Events.CHANNEL_CREATE, channel);
this.client.channels.set(channel.id, channel);
} else if (already) {
return channel;
}

Expand Down

0 comments on commit 22da595

Please sign in to comment.