Use plaintext for Windows notifications

This commit is contained in:
Loren Burkholder 2021-02-15 07:57:25 -05:00 committed by Nicolas Werner
parent 3dcbac8875
commit 8d3e463fa6
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
1 changed files with 3 additions and 1 deletions

View File

@ -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 &notif
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();