From 3ba26ad972a315b9c4d6bfdd3a5c3607fb5528c0 Mon Sep 17 00:00:00 2001 From: SpaceEEC Date: Thu, 19 Apr 2018 13:13:50 +0200 Subject: [PATCH] fix(Message): do not update editedTimestamp when there is none in the payload Fixes #2307 --- src/structures/Message.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/Message.js b/src/structures/Message.js index e6669dfb6..6479e570a 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -160,7 +160,7 @@ class Message { const clone = Util.cloneObject(this); this._edits.unshift(clone); - this.editedTimestamp = new Date(data.edited_timestamp).getTime(); + if ('editedTimestamp' in data) this.editedTimestamp = new Date(data.edited_timestamp).getTime(); if ('content' in data) this.content = data.content; if ('pinned' in data) this.pinned = data.pinned; if ('tts' in data) this.tts = data.tts;