From d41625932eddbcefef5de3e8c565c2663ed21e6f Mon Sep 17 00:00:00 2001 From: Michal Iskierko Date: Mon, 25 Mar 2024 17:34:27 +0100 Subject: [PATCH] fix(@desktop/chat): Fix displaying edits of bridge messages Fix #14044 --- .../main/chat_section/chat_content/messages/module.nim | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app/modules/main/chat_section/chat_content/messages/module.nim b/src/app/modules/main/chat_section/chat_content/messages/module.nim index 7056823316..80296b3172 100644 --- a/src/app/modules/main/chat_section/chat_content/messages/module.nim +++ b/src/app/modules/main/chat_section/chat_content/messages/module.nim @@ -609,9 +609,16 @@ method onMessageEdited*(self: Module, message: MessageDto) = let mentionedUsersPks = itemBeforeChange.mentionedUsersPks let communityChats = self.controller.getCommunityDetails().chats + var updatedText = "" + if message.contentType == ContentType.BridgeMessage: + # message from bridge does not have any tags, we need to add them here to show correctly edited message + updatedText = "

" & message.bridgeMessage.content & "

" + else: + updatedText = self.controller.getRenderedText(message.parsedText, communityChats) + self.view.model().updateEditedMsg( message.id, - self.controller.getRenderedText(message.parsedText, communityChats), + updatedText, message.text, message.parsedText, message.contentType,