Unify redaction handling

The code in messageeventmodel was calling to EventHandler::getBody who
already handles reaction handlings

(cherry picked from commit 16b27700f5)
This commit is contained in:
Carl Schwan
2024-09-06 16:16:09 +02:00
committed by Tobias Fella
parent 0f05c1b921
commit 18db04d073
3 changed files with 1 additions and 11 deletions

View File

@@ -294,7 +294,7 @@ QString EventHandler::getBody(const Quotient::RoomEvent *event, Qt::TextFormat f
{
if (event->isRedacted()) {
auto reason = event->redactedBecause()->reason();
return (reason.isEmpty()) ? i18n("<i>[This message was deleted]</i>") : i18n("<i>[This message was deleted: %1]</i>", reason);
return (reason.isEmpty()) ? i18n("<i>[This message was deleted]</i>") : i18n("<i>[This message was deleted: %1]</i>", reason.toHtmlEscaped());
}
const bool prettyPrint = (format == Qt::RichText);