aboutsummaryrefslogtreecommitdiff
path: root/libdino/src
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2020-01-27 17:32:02 +0100
committerfiaxh <git@lightrise.org>2020-01-27 17:32:02 +0100
commit143212b6c8c3f186f4d1c868a50ea2ba3d394457 (patch)
tree55e8107c07d3176644c78a213e5f59daac196bbc /libdino/src
parent3b0a27e14bcce3a06f0ac1199bb0acb5c3434444 (diff)
downloaddino-143212b6c8c3f186f4d1c868a50ea2ba3d394457.tar.gz
dino-143212b6c8c3f186f4d1c868a50ea2ba3d394457.zip
Don't process message markers on MUC messages
Diffstat (limited to 'libdino/src')
-rw-r--r--libdino/src/service/counterpart_interaction_manager.vala6
1 files changed, 5 insertions, 1 deletions
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) {