From e5ef061fbee8aa912591b1b512d0096cfc968653 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Tue, 17 Nov 2020 10:32:12 +1100 Subject: [PATCH] trigger messageAdded on some message added from ctx menu --- js/models/conversations.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/js/models/conversations.js b/js/models/conversations.js index e6b400393..7e991a41d 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -1489,6 +1489,11 @@ const id = await message.commit(); message.set({ id }); + window.Whisper.events.trigger('messageAdded', { + conversationKey: this.id, + messageModel: message, + }); + await this.commit(); // if change was made remotely, don't send it to the number/group @@ -1593,6 +1598,10 @@ const id = await message.commit(); message.set({ id }); + window.Whisper.events.trigger('messageAdded', { + conversationKey: this.id, + messageModel: message, + }); return message; }, @@ -1736,6 +1745,10 @@ const id = await message.commit(); message.set({ id }); + window.Whisper.events.trigger('messageAdded', { + conversationKey: this.id, + messageModel: message, + }); // FIXME what about public groups? const quitGroup = {