From: Claudio Cambra Date: Mon, 13 Feb 2023 13:15:18 +0000 (+0100) Subject: Only notify talk chat notifications if this is enabled X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~5^2~20^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=babdbd1e3e9b80e976c1623f144d77fc0187aace;p=nextcloud-desktop.git Only notify talk chat notifications if this is enabled Signed-off-by: Claudio Cambra --- diff --git a/src/gui/tray/usermodel.cpp b/src/gui/tray/usermodel.cpp index 98393f4ca..fefbe27f4 100644 --- a/src/gui/tray/usermodel.cpp +++ b/src/gui/tray/usermodel.cpp @@ -184,7 +184,12 @@ void User::showDesktopTalkNotification(const Activity &activity) { const auto notificationId = activity._id; - if (!canShowNotification(notificationId)) { + const ConfigFile cfg; + const auto userStatus = _account->account()->userStatusConnector()->userStatus().state(); + if (!canShowNotification(notificationId) || + userStatus == OCC::UserStatus::OnlineStatus::DoNotDisturb || + !cfg.showChatNotifications()) { + return; }