aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service/counterpart_interaction_manager.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2019-09-14 16:08:08 +0200
committerfiaxh <git@lightrise.org>2019-09-29 00:47:22 +0200
commit1287135ebbe8420de44ab73ce6a553b17067dfdb (patch)
tree10af5c66b8f920c07122270b0374b862222b8bc4 /libdino/src/service/counterpart_interaction_manager.vala
parentf746ce74ce6e905483d86b603df01b81acbca7b4 (diff)
downloaddino-1287135ebbe8420de44ab73ce6a553b17067dfdb.tar.gz
dino-1287135ebbe8420de44ab73ce6a553b17067dfdb.zip
Improve conversation unread status detection
Diffstat (limited to 'libdino/src/service/counterpart_interaction_manager.vala')
-rw-r--r--libdino/src/service/counterpart_interaction_manager.vala2
1 files changed, 2 insertions, 0 deletions
diff --git a/libdino/src/service/counterpart_interaction_manager.vala b/libdino/src/service/counterpart_interaction_manager.vala
index 7da65650..5ff74eb7 100644
--- a/libdino/src/service/counterpart_interaction_manager.vala
+++ b/libdino/src/service/counterpart_interaction_manager.vala
@@ -89,6 +89,8 @@ public class CounterpartInteractionManager : StreamInteractionModule, Object {
if (conversation == null) 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
+ if (conversation.read_up_to.local_time.compare(message.local_time) > 0) return;
conversation.read_up_to = message;
} else {
// We received a marker from someone else. Search the respective message and mark it.