Ignore ack and notification counts if notifications are blocked by the device (#27570)

* Ignore performance counts if notifications are blocked by the device

* Change the endpoint to allow more information

* Add tests and API description

* Remove wrong test

* Address feedback

* Only update the cache when there is no error

* Follow same casing as other props

* use one single endpoint

* Fix tests

* Fix i18n

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Daniel Espino García
2024-09-11 18:01:21 +02:00
коммит произвёл GitHub
родитель b9debc75a0
Коммит af503d9d45
13 изменённых файлов: 329 добавлений и 48 удалений

Просмотреть файл

@@ -218,7 +218,10 @@ func (a *App) sendPushNotificationToAllSessions(rctx request.CTX, msg *model.Pus
}
if msg.Type == model.PushTypeMessage {
a.CountNotification(model.NotificationTypePush, tmpMessage.Platform)
// If we are ignoring the ack, we don't count the send
if session.Props[model.SessionPropDeviceNotificationDisabled] != "true" {
a.CountNotification(model.NotificationTypePush, tmpMessage.Platform)
}
}
}