summary refs log tree commit diff
path: root/src/notifications/ManagerWin.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/ManagerWin.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 '')
-rw-r--r--src/notifications/ManagerWin.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/notifications/ManagerWin.cpp b/src/notifications/ManagerWin.cpp
index f1d3797b..a69afa4e 100644
--- a/src/notifications/ManagerWin.cpp
+++ b/src/notifications/ManagerWin.cpp
@@ -70,7 +70,8 @@ NotificationsManager::postNotification(const mtx::responses::Notification &notif
     auto formatNotification = [this, notification] {
         const auto template_ = getMessageTemplate(notification);
         if (std::holds_alternative<mtx::events::EncryptedEvent<mtx::events::msg::Encrypted>>(
-              notification.event)) {
+              notification.event) ||
+            !template_.contains("%2")) {
             return template_;
         }