Differentiate remove device error from push proxy (#27998)
* Differentiate remove device error from push proxy * Fix variable name
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
62adae14d1
Коммит
e121bebba5
@@ -47,11 +47,15 @@ func (a *App) NotifySessionsExpired() error {
|
||||
|
||||
errPush := a.sendToPushProxy(tmpMessage, session)
|
||||
if errPush != nil {
|
||||
a.CountNotificationReason(model.NotificationStatusError, model.NotificationTypePush, model.NotificationReasonPushProxySendError, tmpMessage.Platform)
|
||||
reason := model.NotificationReasonPushProxySendError
|
||||
if errPush.Error() == notificationErrorRemoveDevice {
|
||||
reason = model.NotificationReasonPushProxyRemoveDevice
|
||||
}
|
||||
a.CountNotificationReason(model.NotificationStatusError, model.NotificationTypePush, reason, tmpMessage.Platform)
|
||||
a.NotificationsLog().Error("Failed to send to push proxy",
|
||||
mlog.String("type", model.NotificationTypePush),
|
||||
mlog.String("status", model.NotificationStatusNotSent),
|
||||
mlog.String("reason", model.NotificationReasonPushProxySendError),
|
||||
mlog.String("reason", reason),
|
||||
mlog.String("ack_id", tmpMessage.AckId),
|
||||
mlog.String("push_type", tmpMessage.Type),
|
||||
mlog.String("user_id", session.UserId),
|
||||
|
||||
Ссылка в новой задаче
Block a user