2021-02-16 02:36:10 +03:00
|
|
|
#include "Manager.h"
|
|
|
|
|
2021-02-20 22:00:13 +03:00
|
|
|
#include <QRegularExpression>
|
2021-02-16 02:36:10 +03:00
|
|
|
#include <QTextDocumentFragment>
|
|
|
|
|
2021-02-20 21:16:43 +03:00
|
|
|
#include "EventAccessors.h"
|
2021-02-16 02:36:10 +03:00
|
|
|
#include "Utils.h"
|
|
|
|
|
|
|
|
QString
|
2021-02-20 21:16:43 +03:00
|
|
|
NotificationsManager::formatNotification(const mtx::events::collections::TimelineEvents &e)
|
2021-02-16 02:36:10 +03:00
|
|
|
{
|
2021-02-20 22:00:13 +03:00
|
|
|
return QTextDocumentFragment::fromHtml(
|
|
|
|
mtx::accessors::formattedBodyWithFallback(e).replace(
|
|
|
|
QRegularExpression("(<mx-reply>.+\\<\\/mx-reply\\>)"), ""))
|
|
|
|
.toPlainText();
|
2021-02-16 02:36:10 +03:00
|
|
|
}
|