diff options
author | Loren Burkholder <computersemiexpert@outlook.com> | 2021-02-15 07:57:25 -0500 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-03-17 19:17:13 +0100 |
commit | 8d3e463fa60d91ee0876c199bd3d0810e8074821 (patch) | |
tree | 5a9ae540a0aceee28c823409df6df4bf0fdb9ada /src/notifications | |
parent | Only pass formatted text if it is supported (Linux) (diff) | |
download | nheko-8d3e463fa60d91ee0876c199bd3d0810e8074821.tar.xz |
Use plaintext for Windows notifications
Diffstat (limited to 'src/notifications')
-rw-r--r-- | src/notifications/ManagerWin.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/notifications/ManagerWin.cpp b/src/notifications/ManagerWin.cpp index 5a1a867c..2ddb48cc 100644 --- a/src/notifications/ManagerWin.cpp +++ b/src/notifications/ManagerWin.cpp @@ -5,6 +5,8 @@ #include "notifications/Manager.h" #include "wintoastlib.h" +#include <QTextDocumentFragment> + #include "Cache.h" #include "EventAccessors.h" #include "MatrixClient.h" @@ -54,7 +56,7 @@ NotificationsManager::postNotification(const mtx::responses::Notification ¬if cache::displayName(QString::fromStdString(notification.room_id), QString::fromStdString(mtx::accessors::sender(notification.event))); const auto text = utils::event_body(notification.event); - const auto formattedText = cmark_markdown_to_html(text.toStdString().c_str(), text.length(), CMARK_OPT_UNSAFE); + const auto formattedText = QTextDocumentFragment::fromHtml(utils::markdownToHtml(text)).toPlainText(); if (!isInitialized) init(); |