summary refs log tree commit diff
path: root/src/notifications/ManagerLinux.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2024-05-16 12:53:34 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2024-05-16 13:12:37 +0200
commit61509792706bf39860ee52bd92ca04f74af112bd (patch)
tree97c11f9e53d6331accd8195a6eb4a943a680765f /src/notifications/ManagerLinux.cpp
parentWindows screenshare/video call support, general call improvements (#1725) (diff)
downloadnheko-61509792706bf39860ee52bd92ca04f74af112bd.tar.xz
Don't show spoilers in sidebar or notifications if possible
fixes #1247
Diffstat (limited to 'src/notifications/ManagerLinux.cpp')
-rw-r--r--src/notifications/ManagerLinux.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/notifications/ManagerLinux.cpp b/src/notifications/ManagerLinux.cpp

index 11a7c1a1..75ba1886 100644 --- a/src/notifications/ManagerLinux.cpp +++ b/src/notifications/ManagerLinux.cpp
@@ -107,7 +107,8 @@ NotificationsManager::postNotification(const mtx::responses::Notification &notif QString template_ = getMessageTemplate(notification); // TODO: decrypt this message if the decryption setting is on in the UserSettings if (std::holds_alternative<mtx::events::EncryptedEvent<mtx::events::msg::Encrypted>>( - notification.event)) { + notification.event) || + !template_.contains("%2")) { postNotif(template_); return; } @@ -115,7 +116,7 @@ NotificationsManager::postNotification(const mtx::responses::Notification &notif if (hasMarkup_) { if (hasImages_ && (mtx::accessors::msg_type(notification.event) == mtx::events::MessageType::Image || - mtx::accessors::msg_type(notification.event) == mtx::events::MessageType::Image)) { + mtx::accessors::event_type(notification.event) == mtx::events::EventType::Sticker)) { MxcImageProvider::download( QString::fromStdString(mtx::accessors::url(notification.event)) .remove(QStringLiteral("mxc://")),