From 12208aac0b35df2b314067c75131c2ca68194444 Mon Sep 17 00:00:00 2001 From: CylonicRaider Date: Thu, 2 Aug 2018 01:01:51 +0200 Subject: [PATCH] Send the previous edit ID along with message editing requests --- client/lib/stores/chat.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/lib/stores/chat.js b/client/lib/stores/chat.js index 43a3ddd1..99007672 100644 --- a/client/lib/stores/chat.js +++ b/client/lib/stores/chat.js @@ -686,9 +686,11 @@ module.exports.store = Reflux.createStore({ }, editMessage(id, data) { + const msg = this.state.messages.get(id) + const previous_edit_id = msg && msg.get('previous_edit_id') this.socket.send({ type: 'edit-message', - data: _.merge(data, {id}), + data: _.merge(data, {id, previous_edit_id}), }) },