Этот коммит содержится в:
Tim Scheuermann
2022-08-18 11:01:37 +02:00
коммит произвёл GitHub
родитель 8e0d46e0c6
Коммит a28a967eba
92 изменённых файлов: 1681 добавлений и 1677 удалений

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

@@ -232,14 +232,14 @@ func (a *App) clearPushNotificationSync(c request.CTX, currentSessionId, userID,
unreadCount, err := a.Srv().Store.User().GetUnreadCount(userID)
if err != nil {
return model.NewAppError("clearPushNotificationSync", "app.user.get_unread_count.app_error", nil, err.Error(), http.StatusInternalServerError)
return model.NewAppError("clearPushNotificationSync", "app.user.get_unread_count.app_error", nil, "", http.StatusInternalServerError).Wrap(err)
}
msg.Badge = int(unreadCount)
if msg.IsCRTEnabled {
totalUnreadMentions, err := a.Srv().Store.Thread().GetTotalUnreadMentions(userID, "", model.GetUserThreadsOpts{})
if err != nil {
return model.NewAppError("clearPushNotificationSync", "app.user.get_thread_count_for_user.app_error", nil, err.Error(), http.StatusInternalServerError)
return model.NewAppError("clearPushNotificationSync", "app.user.get_thread_count_for_user.app_error", nil, "", http.StatusInternalServerError).Wrap(err)
}
msg.Badge += int(totalUnreadMentions)
}
@@ -270,7 +270,7 @@ func (a *App) updateMobileAppBadgeSync(userID string) *model.AppError {
unreadCount, err := a.Srv().Store.User().GetUnreadCount(userID)
if err != nil {
return model.NewAppError("updateMobileAppBadgeSync", "app.user.get_unread_count.app_error", nil, err.Error(), http.StatusInternalServerError)
return model.NewAppError("updateMobileAppBadgeSync", "app.user.get_unread_count.app_error", nil, "", http.StatusInternalServerError).Wrap(err)
}
msg.Badge = int(unreadCount)