summary refs log tree commit diff
path: root/src/timeline/TimelineModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/timeline/TimelineModel.cpp')
-rw-r--r--src/timeline/TimelineModel.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp

index 79d6883f..5a5f4850 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp
@@ -1814,11 +1814,13 @@ TimelineModel::formatRedactedEvent(QString id) QString reason = ""; auto because = event->unsigned_data.redacted_because; // User info about who actually sent the redacted event. - QString redactedUser = QString::fromStdString(because->sender).toHtmlEscaped(); - QString redactedName = utils::replaceEmoji(displayName(redactedUser)); + QString redactedUser; + QString redactedName; if (because.has_value()) { - reason = QString::fromStdString(because->content.reason).toHtmlEscaped(); + redactedUser = QString::fromStdString(because->sender).toHtmlEscaped(); + redactedName = utils::replaceEmoji(displayName(redactedUser)); + reason = QString::fromStdString(because->content.reason).toHtmlEscaped(); } if (reason.isEmpty()) {