From 143212b6c8c3f186f4d1c868a50ea2ba3d394457 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Mon, 27 Jan 2020 17:32:02 +0100 Subject: Don't process message markers on MUC messages --- libdino/src/service/counterpart_interaction_manager.vala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libdino/src/service/counterpart_interaction_manager.vala b/libdino/src/service/counterpart_interaction_manager.vala index 6ee55ae4..b994ca64 100644 --- a/libdino/src/service/counterpart_interaction_manager.vala +++ b/libdino/src/service/counterpart_interaction_manager.vala @@ -89,7 +89,7 @@ public class CounterpartInteractionManager : StreamInteractionModule, Object { // If we received a display marker from ourselves (other device), set the conversation read up to that message. if (marker != Xep.ChatMarkers.MARKER_DISPLAYED && marker != Xep.ChatMarkers.MARKER_ACKNOWLEDGED) return; Conversation? conversation = stream_interactor.get_module(MessageStorage.IDENTITY).get_conversation_for_stanza_id(account, stanza_id); - if (conversation == null) return; + if (conversation == null || conversation.type_ == Conversation.Type.GROUPCHAT) return; Entities.Message? message = stream_interactor.get_module(MessageStorage.IDENTITY).get_message_by_stanza_id(stanza_id, conversation); if (message == null) return; // Don't move read marker backwards because we get old info from another client @@ -98,6 +98,10 @@ public class CounterpartInteractionManager : StreamInteractionModule, Object { } else { // We received a marker from someone else. Search the respective message and mark it. foreach (Conversation conversation in stream_interactor.get_module(ConversationManager.IDENTITY).get_conversations(jid, account)) { + + // We can't currently handle chat markers in MUCs + if (conversation.type_ == Conversation.Type.GROUPCHAT) continue; + Entities.Message? message = stream_interactor.get_module(MessageStorage.IDENTITY).get_message_by_stanza_id(stanza_id, conversation); if (message != null) { switch (marker) { -- cgit v1.2.3-54-g00ecf