From 67dbfdd0b0f93dfe2e63b331096e94499def9396 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Sat, 16 Mar 2019 01:13:40 +0100 Subject: Fix received mark for own OMEMO encrypted MUC messages --- libdino/src/service/muc_manager.vala | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'libdino/src') diff --git a/libdino/src/service/muc_manager.vala b/libdino/src/service/muc_manager.vala index 243aeb1c..534f9d75 100644 --- a/libdino/src/service/muc_manager.vala +++ b/libdino/src/service/muc_manager.vala @@ -396,13 +396,11 @@ public class MucManager : StreamInteractionModule, Object { } } Jid? own_muc_jid = stream_interactor.get_module(MucManager.IDENTITY).get_own_jid(message.counterpart.bare_jid, conversation.account); - if (own_muc_jid != null && message.from.equals(own_muc_jid)) { - Gee.List messages = stream_interactor.get_module(MessageStorage.IDENTITY).get_messages(conversation); - foreach (Entities.Message m in messages) { // TODO not here - if (m.equals(message)) { - // For own messages from this device (msg is a duplicate) - m.marked = Message.Marked.RECEIVED; - } + if (stanza.id != null && own_muc_jid != null && message.from.equals(own_muc_jid)) { + Entities.Message? m = stream_interactor.get_module(MessageStorage.IDENTITY).get_message_by_stanza_id(stanza.id, conversation); + if (m != null) { + // For own messages from this device (msg is a duplicate) + m.marked = Message.Marked.RECEIVED; } // For own messages from other devices (msg is not a duplicate msg) message.marked = Message.Marked.RECEIVED; -- cgit v1.2.3-70-g09d2