summary refs log tree commit diff
path: root/src/notifications/ManagerMac.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2024-08-21 00:14:34 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2024-08-21 00:29:11 +0200
commitd1eb35197546a491ce3503c7c2582980e90b6c52 (patch)
treef563e0a6d99e423970d9bfd954f24123bb8608ed /src/notifications/ManagerMac.cpp
parentWarn about room name and topic not being encrypted (diff)
downloadnheko-d1eb35197546a491ce3503c7c2582980e90b6c52.tar.xz
Allow loading image only after explicit interactions
Diffstat (limited to 'src/notifications/ManagerMac.cpp')
-rw-r--r--src/notifications/ManagerMac.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/notifications/ManagerMac.cpp b/src/notifications/ManagerMac.cpp

index ee5639e4..03b2480d 100644 --- a/src/notifications/ManagerMac.cpp +++ b/src/notifications/ManagerMac.cpp
@@ -93,7 +93,9 @@ NotificationsManager::postNotification(const mtx::responses::Notification &notif } else { const QString messageInfo = (isReply ? tr("%1 replied to a message") : tr("%1 sent a message")).arg(sender); - if (mtx::accessors::msg_type(notification.event) == mtx::events::MessageType::Image) + if (allowShowingImages(notification) && + (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("mxc://"), QSize(200, 80),