From 4150d75be7c8945808434d67bd23bb688707af29 Mon Sep 17 00:00:00 2001 From: Loren Burkholder Date: Sat, 20 Feb 2021 11:57:42 -0500 Subject: [PATCH] Only HTML-format the body if it should be formatted --- src/notifications/Manager.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/notifications/Manager.cpp b/src/notifications/Manager.cpp index 083107fb..dda06299 100644 --- a/src/notifications/Manager.cpp +++ b/src/notifications/Manager.cpp @@ -19,9 +19,11 @@ NotificationsManager::postNotification(const mtx::responses::Notification ¬if QString text; if (mtx::accessors::msg_type(notification.event) == mtx::events::MessageType::Emote) text = - "* " + sender + " " + formatNotification(utils::event_body(notification.event)); + formatNotification("* " + sender + " " + + mtx::accessors::formattedBodyWithFallback(notification.event)); 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); }