Fix Linux HTML notifications

This commit is contained in:
Loren Burkholder 2021-02-19 20:13:27 -05:00 committed by Nicolas Werner
parent b05657d51a
commit dcd9b80dde
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9

View file

@ -154,11 +154,12 @@ NotificationsManager::notificationClosed(uint id, uint reason)
QString QString
NotificationsManager::formatNotification(const QString &text) NotificationsManager::formatNotification(const QString &text)
{ {
static auto capabilites = dbus.call("GetCapabilites"); static auto capabilites = dbus.call("GetCapabilities").arguments();
if (capabilites.arguments().contains("body-markup")) for (auto x : capabilites)
return text; if (x.toStringList().contains("body-markup"))
else return utils::markdownToHtml(text);
return QTextDocumentFragment::fromHtml(text).toPlainText();
return QTextDocumentFragment::fromHtml(utils::markdownToHtml(text)).toPlainText();
} }
/** /**