fix(@desktop/chat): fix edited keyword for bridged messages

Issue #15291
This commit is contained in:
Michal Iskierko 2024-07-05 16:51:18 +02:00 committed by Michał Iskierko
parent c8744cf3bf
commit ab3fefa838
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ Item {
isQuote = (formattedMessage.startsWith("<blockquote>") && formattedMessage.endsWith("</blockquote>"));
if (root.isEdited) {
const index = formattedMessage.endsWith("code>") ? formattedMessage.length : formattedMessage.length - 4;
const index = formattedMessage.endsWith("code>") ? formattedMessage.length : (formattedMessage.endsWith(">") ? formattedMessage.length - 4 : formattedMessage.length);
const editedMessage = formattedMessage.slice(0, index)
+ ` <span class="isEdited">` + qsTr("(edited)") + `</span>`
+ formattedMessage.slice(index);