Fix login, clone objects when firing x-Updated events

This commit is contained in:
abalabahaha
2016-01-24 16:41:35 -08:00
parent 2c6cbb6675
commit 2c17eaed02
12 changed files with 39 additions and 37 deletions

View File

@@ -10,7 +10,7 @@ export default class PMChannel extends Channel {
super(data, client);
this.type = data.type || "text";
this.lastMessageId = data.last_message_id;
this.lastMessageId = data.last_message_id || data.lastMessageId;
this.messages = new Cache("id", 1000);
this.recipient = this.client.internal.users.add(new User(data.recipient, this.client));
}