diff options
author | fiaxh <git@lightrise.org> | 2019-03-16 01:13:40 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2019-03-16 01:13:49 +0100 |
commit | 67dbfdd0b0f93dfe2e63b331096e94499def9396 (patch) | |
tree | f1d7416ff1db47f73a8550949f0c5db5a6a9fbc0 /libdino | |
parent | 6f6e4b97cba49469440fc0aefafb71623a3eabb9 (diff) | |
download | dino-67dbfdd0b0f93dfe2e63b331096e94499def9396.tar.gz dino-67dbfdd0b0f93dfe2e63b331096e94499def9396.zip |
Fix received mark for own OMEMO encrypted MUC messages
Diffstat (limited to 'libdino')
-rw-r--r-- | libdino/src/service/muc_manager.vala | 12 |
1 files changed, 5 insertions, 7 deletions
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<Entities.Message> 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; |