diff options
author | fiaxh <git@lightrise.org> | 2022-01-03 18:33:22 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2022-01-03 18:33:22 +0100 |
commit | 9e8b99e86c5f91b6a981c17580855adc68df921a (patch) | |
tree | 12ee8da1a7fff98529ed1c3f42e786ef0ad98a57 /libdino | |
parent | 6b8ad7a1044f3f01cc0789e912800350a64c0c2c (diff) | |
download | dino-9e8b99e86c5f91b6a981c17580855adc68df921a.tar.gz dino-9e8b99e86c5f91b6a981c17580855adc68df921a.zip |
Fix runtime critical on incoming read marker
This would result in all messages being counted as unread and highlighted in the conversation list accordingly.
As of fa1ba2f8, there are no hidden content items for http file upload _messages_ anymore.
Diffstat (limited to 'libdino')
-rw-r--r-- | libdino/src/service/counterpart_interaction_manager.vala | 2 |
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 03eb6c6f..cc5489c3 100644 --- a/libdino/src/service/counterpart_interaction_manager.vala +++ b/libdino/src/service/counterpart_interaction_manager.vala @@ -153,7 +153,9 @@ public class CounterpartInteractionManager : StreamInteractionModule, Object { if (conversation.read_up_to != null && conversation.read_up_to.local_time.compare(message.local_time) > 0) return; conversation.read_up_to = message; + // TODO: This only marks messages as read, not http file transfers. ContentItem? content_item = stream_interactor.get_module(ContentItemStore.IDENTITY).get_item(conversation, 1, message.id); + if (content_item == null) return; ContentItem? read_up_to_item = stream_interactor.get_module(ContentItemStore.IDENTITY).get_item_by_id(conversation, conversation.read_up_to_item); if (read_up_to_item != null && read_up_to_item.compare(content_item) > 0) return; conversation.read_up_to_item = content_item.id; |