Do not mark messages as read if they are only marked as received

This commit is contained in:
Thibaut Girka 2018-03-22 14:37:25 +01:00 committed by fiaxh
parent 4ccdc1d092
commit c712e6ed4a

View file

@ -66,6 +66,7 @@ public class CounterpartInteractionManager : StreamInteractionModule, Object {
private void on_chat_marker_received(Account account, Jid jid, string marker, string stanza_id) { 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(); bool own_marker = account.bare_jid.to_string() == jid.bare_jid.to_string();
if (own_marker) { 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); Conversation? conversation = stream_interactor.get_module(MessageStorage.IDENTITY).get_conversation_for_stanza_id(account, stanza_id);
if (conversation == null) return; if (conversation == null) return;
Entities.Message? message = stream_interactor.get_module(MessageStorage.IDENTITY).get_message_by_id(stanza_id, conversation); Entities.Message? message = stream_interactor.get_module(MessageStorage.IDENTITY).get_message_by_id(stanza_id, conversation);