diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2024-05-16 12:53:34 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2024-05-16 13:12:37 +0200 |
commit | 61509792706bf39860ee52bd92ca04f74af112bd (patch) | |
tree | 97c11f9e53d6331accd8195a6eb4a943a680765f /src/notifications/ManagerWin.cpp | |
parent | Windows screenshare/video call support, general call improvements (#1725) (diff) | |
download | nheko-61509792706bf39860ee52bd92ca04f74af112bd.tar.xz |
Don't show spoilers in sidebar or notifications if possible
fixes #1247
Diffstat (limited to '')
-rw-r--r-- | src/notifications/ManagerWin.cpp | 3 |
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 ¬if 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_; } |