aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-03-22 14:37:25 +0100
committerfiaxh <fiaxh@users.noreply.github.com>2018-03-22 09:31:23 -0600
commitc712e6ed4ad1e5330e416a4de05195c053b89d57 (patch)
tree89605cef391fa5812453ac3bee19e2196ff375e2
parent4ccdc1d0920a93b313d81b4014b6f45efb49b1fe (diff)
downloaddino-c712e6ed4ad1e5330e416a4de05195c053b89d57.tar.gz
dino-c712e6ed4ad1e5330e416a4de05195c053b89d57.zip
Do not mark messages as read if they are only marked as received
-rw-r--r--libdino/src/service/counterpart_interaction_manager.vala1
1 files changed, 1 insertions, 0 deletions
diff --git a/libdino/src/service/counterpart_interaction_manager.vala b/libdino/src/service/counterpart_interaction_manager.vala
index 1548d9fa..fb10d20c 100644
--- a/libdino/src/service/counterpart_interaction_manager.vala
+++ b/libdino/src/service/counterpart_interaction_manager.vala
@@ -66,6 +66,7 @@ public class CounterpartInteractionManager : StreamInteractionModule, Object {
private void on_chat_marker_received(Account account, Jid jid, string marker, string stanza_id) {
bool own_marker = account.bare_jid.to_string() == jid.bare_jid.to_string();
if (own_marker) {
+ 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;
Entities.Message? message = stream_interactor.get_module(MessageStorage.IDENTITY).get_message_by_id(stanza_id, conversation);