update status.go (fix errcheck issue) (#29156)

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
This commit is contained in:
TheInvincible 2024-11-18 09:23:11 +01:00 committed by GitHub
parent c682f649b5
commit c2c2bc1efe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View file

@ -135,7 +135,6 @@ issues:
channels/app/slashcommands/auto_environment.go|\
channels/app/slashcommands/command_test.go|\
channels/app/slashcommands/helper_test.go|\
channels/app/status.go|\
channels/app/status_test.go|\
channels/app/support_packet_test.go|\
channels/app/team.go|\

View file

@ -98,13 +98,15 @@ func (a *App) SetCustomStatus(c request.CTX, userID string, cs *model.CustomStat
return err
}
user.SetCustomStatus(cs)
if err := user.SetCustomStatus(cs); err != nil {
c.Logger().Error("Failed to set custom status", mlog.String("userID", userID), mlog.Err(err))
}
_, updateErr := a.UpdateUser(c, user, true)
if updateErr != nil {
return updateErr
}
if err := a.addRecentCustomStatus(c, userID, cs); err != nil {
if err = a.addRecentCustomStatus(c, userID, cs); err != nil {
c.Logger().Error("Can't add recent custom status for", mlog.String("userID", userID), mlog.Err(err))
}