Only HTML-format the body if it should be formatted

This commit is contained in:
Loren Burkholder 2021-02-20 11:57:42 -05:00 committed by Nicolas Werner
parent c38c6fe49e
commit 4150d75be7
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
1 changed files with 4 additions and 2 deletions

View File

@ -19,9 +19,11 @@ NotificationsManager::postNotification(const mtx::responses::Notification &notif
QString text; QString text;
if (mtx::accessors::msg_type(notification.event) == mtx::events::MessageType::Emote) if (mtx::accessors::msg_type(notification.event) == mtx::events::MessageType::Emote)
text = text =
"* " + sender + " " + formatNotification(utils::event_body(notification.event)); formatNotification("* " + sender + " " +
mtx::accessors::formattedBodyWithFallback(notification.event));
else else
text = sender + ": " + formatNotification(utils::event_body(notification.event)); text = formatNotification(
sender + ": " + mtx::accessors::formattedBodyWithFallback(notification.event));
systemPostNotification(room_id, event_id, room_name, sender, text, icon); systemPostNotification(room_id, event_id, room_name, sender, text, icon);
} }