Only notify talk chat notifications if this is enabled

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2023-02-13 14:15:18 +01:00 committed by Matthieu Gallien
parent 918d79f5cd
commit babdbd1e3e

View File

@ -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;
}