Added semi-functional statuses

This commit is contained in:
hydrabolt
2015-09-26 21:41:23 +01:00
parent 1ef4fa41a7
commit 2f9585a6b9
5 changed files with 105 additions and 66 deletions

View File

@@ -24,9 +24,15 @@ var Channel = (function () {
}, {
key: "addMessage",
value: function addMessage(data) {
if (this.messages.length > 1000) {
this.messages.splice(0, 1);
}
if (!this.getMessage("id", data.id)) {
this.messages.push(data);
}
return this.getMessage("id", data.id);
}
}, {