mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +03:00
Fix crash on redactions without because
This commit is contained in:
parent
0d43eb1e11
commit
b505fa42d5
1 changed files with 5 additions and 3 deletions
|
@ -1814,10 +1814,12 @@ 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()) {
|
||||
redactedUser = QString::fromStdString(because->sender).toHtmlEscaped();
|
||||
redactedName = utils::replaceEmoji(displayName(redactedUser));
|
||||
reason = QString::fromStdString(because->content.reason).toHtmlEscaped();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue