Stop comparing for equality on update events and just emit for performance

This commit is contained in:
Amish Shah
2016-09-25 11:23:47 +01:00
parent c8636fd277
commit 0e8f1bef97
6 changed files with 21 additions and 7 deletions

View File

@@ -9,7 +9,7 @@ class MessageUpdateAction extends Action {
const channel = client.channels.get(data.channel_id);
if (channel) {
const message = channel.messages.get(data.id);
if (message && !message.equals(data, true)) {
if (message) {
const oldMessage = cloneObject(message);
message.patch(data);
message._edits.unshift(oldMessage);