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
NotificationsManager::formatNotification(const QString &text)
{
static auto capabilites = dbus.call("GetCapabilites");
if (capabilites.arguments().contains("body-markup"))
return text;
else
return QTextDocumentFragment::fromHtml(text).toPlainText();
static auto capabilites = dbus.call("GetCapabilities").arguments();
for (auto x : capabilites)
if (x.toStringList().contains("body-markup"))
return utils::markdownToHtml(text);
return QTextDocumentFragment::fromHtml(utils::markdownToHtml(text)).toPlainText();
}
/**