Remove unneeded check for DnD status when showing desktop talk notification
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Mon, 18 Nov 2024 08:15:31 +0000 (16:15 +0800)
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>
Thu, 21 Nov 2024 11:31:23 +0000 (12:31 +0100)
The server will not deliver it anyway

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
src/gui/tray/usermodel.cpp

index fefbe27f46c2b6a5f24800e312c8b355041dce54..c39b1406e57c39f4010da4fd78520c9ffc6fa7e0 100644 (file)
@@ -184,12 +184,7 @@ void User::showDesktopTalkNotification(const Activity &activity)
 {
     const auto notificationId = activity._id;
 
-    const ConfigFile cfg;
-    const auto userStatus = _account->account()->userStatusConnector()->userStatus().state();
-    if (!canShowNotification(notificationId) ||
-        userStatus == OCC::UserStatus::OnlineStatus::DoNotDisturb ||
-        !cfg.showChatNotifications()) {
-
+    if (!canShowNotification(notificationId) || !ConfigFile().showChatNotifications()) {
         return;
     }