diff --git a/src/gui/tray/usermodel.cpp b/src/gui/tray/usermodel.cpp index 5907f00d5da47..f02a2f8c71ac2 100644 --- a/src/gui/tray/usermodel.cpp +++ b/src/gui/tray/usermodel.cpp @@ -130,10 +130,18 @@ void User::slotBuildNotificationDisplay(const ActivityList &list) void User::slotBuildIncomingCallDialogs(const ActivityList &list) { - const auto systray = Systray::instance(); const ConfigFile cfg; + const auto userStatus = _account->account()->userStatusConnector()->userStatus().state(); + if (userStatus == OCC::UserStatus::OnlineStatus::DoNotDisturb || + !cfg.optionalServerNotifications() || + !cfg.showCallNotifications() || + !isDesktopNotificationsAllowed()) { + return; + } + + const auto systray = Systray::instance(); - if(systray && cfg.showCallNotifications()) { + if(systray) { for(const auto &activity : list) { systray->createCallDialog(activity); }