aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service/conversation_manager.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2020-12-04 19:11:27 +0100
committerfiaxh <git@lightrise.org>2020-12-04 19:11:27 +0100
commitcc01374d3cb6a8bf477e8f96378f20b9aff57536 (patch)
tree16275a127a84d9dc5aa1269aef7590d8fd8ea73d /libdino/src/service/conversation_manager.vala
parentf31e96d6bb51448a87edd820ebca630ca576d890 (diff)
downloaddino-cc01374d3cb6a8bf477e8f96378f20b9aff57536.tar.gz
dino-cc01374d3cb6a8bf477e8f96378f20b9aff57536.zip
Use advertized/server/live time for sorting instead of arrival time
fixes #310
Diffstat (limited to 'libdino/src/service/conversation_manager.vala')
-rw-r--r--libdino/src/service/conversation_manager.vala4
1 files changed, 2 insertions, 2 deletions
diff --git a/libdino/src/service/conversation_manager.vala b/libdino/src/service/conversation_manager.vala
index 8b33f52f..99cc9039 100644
--- a/libdino/src/service/conversation_manager.vala
+++ b/libdino/src/service/conversation_manager.vala
@@ -177,7 +177,7 @@ public class ConversationManager : StreamInteractionModule, Object {
if (stanza != null) {
bool is_mam_message = Xep.MessageArchiveManagement.MessageFlag.get_flag(stanza) != null;
- bool is_recent = message.local_time.compare(new DateTime.now_utc().add_days(-3)) > 0;
+ bool is_recent = message.time.compare(new DateTime.now_utc().add_days(-3)) > 0;
if (is_mam_message && !is_recent) return false;
}
stream_interactor.get_module(ConversationManager.IDENTITY).start_conversation(conversation);
@@ -188,7 +188,7 @@ public class ConversationManager : StreamInteractionModule, Object {
private void handle_sent_message(Entities.Message message, Conversation conversation) {
conversation.last_active = message.time;
- bool is_recent = message.local_time.compare(new DateTime.now_utc().add_hours(-24)) > 0;
+ bool is_recent = message.time.compare(new DateTime.now_utc().add_hours(-24)) > 0;
if (is_recent) {
start_conversation(conversation);
}