[MM-61774] Fix errcheck issues in server/channels/app/platform/status.go (#30876)

Co-authored-by: Claude <noreply@anthropic.com>
Этот коммит содержится в:
Ben Schumacher
2025-05-07 09:04:22 +02:00
коммит произвёл GitHub
родитель 7f1987caec
Коммит e10a1309c1
2 изменённых файлов: 6 добавлений и 3 удалений

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

@@ -96,7 +96,6 @@ issues:
channels/app/permissions_test.go|\
channels/app/platform/helper_test.go|\
channels/app/platform/license.go|\
channels/app/platform/status.go|\
channels/app/slashcommands/command_test.go|\
channels/app/slashcommands/helper_test.go|\
channels/app/upload.go|\

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

@@ -16,7 +16,9 @@ import (
)
func (ps *PlatformService) AddStatusCacheSkipClusterSend(status *model.Status) {
ps.statusCache.SetWithDefaultExpiry(status.UserId, status)
if err := ps.statusCache.SetWithDefaultExpiry(status.UserId, status); err != nil {
ps.logger.Warn("Failed to set cache entry for status", mlog.String("user_id", status.UserId), mlog.Err(err))
}
}
func (ps *PlatformService) AddStatusCache(status *model.Status) {
@@ -287,7 +289,9 @@ func (ps *PlatformService) UpdateLastActivityAtIfNeeded(session model.Session) {
}
session.LastActivityAt = now
ps.AddSessionToCache(&session)
if err := ps.AddSessionToCache(&session); err != nil {
mlog.Warn("Failed to add session to cache", mlog.String("user_id", session.UserId), mlog.String("session_id", session.Id), mlog.Err(err))
}
}
func (ps *PlatformService) SetStatusOnline(userID string, manual bool) {