From 6b8ad7a1044f3f01cc0789e912800350a64c0c2c Mon Sep 17 00:00:00 2001 From: fiaxh Date: Sat, 1 Jan 2022 19:47:46 +0100 Subject: Fix delivery error displaying for MUC PMs fixes #1113 --- libdino/src/service/message_processor.vala | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'libdino/src/service') diff --git a/libdino/src/service/message_processor.vala b/libdino/src/service/message_processor.vala index 4fe1f6c3..6445ce40 100644 --- a/libdino/src/service/message_processor.vala +++ b/libdino/src/service/message_processor.vala @@ -144,9 +144,13 @@ public class MessageProcessor : StreamInteractionModule, Object { } }); stream_interactor.module_manager.get_module(account, Xmpp.MessageModule.IDENTITY).received_error.connect((stream, message_stanza, error_stanza) => { - Conversation? conversation = stream_interactor.get_module(ConversationManager.IDENTITY).get_conversation(message_stanza.from.bare_jid, account); - if (conversation == null) return; - Message? message = stream_interactor.get_module(MessageStorage.IDENTITY).get_message_by_stanza_id(message_stanza.id, conversation); + Message? message = null; + + Gee.List conversations = stream_interactor.get_module(ConversationManager.IDENTITY).get_conversations(message_stanza.from, account); + foreach (Conversation conversation in conversations) { + message = stream_interactor.get_module(MessageStorage.IDENTITY).get_message_by_stanza_id(message_stanza.id, conversation); + if (message != null) break; + } if (message == null) return; // We don't care about delivery errors if our counterpart already ACKed the message. if (message.marked in Message.MARKED_RECEIVED) return; -- cgit v1.2.3-70-g09d2