Only HTML-format the body if it should be formatted

pull/475/head
Loren Burkholder 4 years ago committed by Nicolas Werner
parent c38c6fe49e
commit 4150d75be7
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 6
      src/notifications/Manager.cpp

@ -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);
} }

Loading…
Cancel
Save