mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +03:00
Fix Linux HTML notifications
This commit is contained in:
parent
b05657d51a
commit
dcd9b80dde
1 changed files with 6 additions and 5 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue