fix(@desktop/chat): Fix displaying edits of bridge messages

Fix #14044
This commit is contained in:
Michal Iskierko 2024-03-25 17:34:27 +01:00 committed by Michał Iskierko
parent 28f09eeb82
commit d41625932e
1 changed files with 8 additions and 1 deletions

View File

@ -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 = "<p>" & message.bridgeMessage.content & "</p>"
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,