From b60e7da28aad7532b71e92c766ed3cc2698c47c5 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Sun, 6 Sep 2020 15:42:54 +0200 Subject: Fix message duplication in MUC PMs --- libdino/src/entity/message.vala | 2 +- libdino/src/service/message_processor.vala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'libdino/src') diff --git a/libdino/src/entity/message.vala b/libdino/src/entity/message.vala index 272905a9..7192f6aa 100644 --- a/libdino/src/entity/message.vala +++ b/libdino/src/entity/message.vala @@ -81,7 +81,7 @@ public class Message : Object { if (counterpart_resource != null) counterpart = counterpart.with_resource(counterpart_resource); string our_resource = row[db.message.our_resource]; - if (type_.is_muc_semantic() && our_resource != null) { + if (type_ == Type.GROUPCHAT && our_resource != null) { ourpart = counterpart.with_resource(our_resource); } else if (our_resource != null) { ourpart = account.bare_jid.with_resource(our_resource); diff --git a/libdino/src/service/message_processor.vala b/libdino/src/service/message_processor.vala index 3e92e61f..5ddf86a6 100644 --- a/libdino/src/service/message_processor.vala +++ b/libdino/src/service/message_processor.vala @@ -598,7 +598,7 @@ public class MessageProcessor : StreamInteractionModule, Object { message.local_time = now; message.direction = Entities.Message.DIRECTION_SENT; message.counterpart = conversation.counterpart; - if (conversation.type_.is_muc_semantic()) { + if (conversation.type_ == Conversation.Type.GROUPCHAT) { message.ourpart = stream_interactor.get_module(MucManager.IDENTITY).get_own_jid(conversation.counterpart, conversation.account) ?? conversation.account.bare_jid; message.real_jid = conversation.account.bare_jid; } else { -- cgit v1.2.3-70-g09d2