update status.go (fix errcheck issue) (#29156)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c682f649b5
Коммит
c2c2bc1efe
@@ -135,7 +135,6 @@ issues:
|
|||||||
channels/app/slashcommands/auto_environment.go|\
|
channels/app/slashcommands/auto_environment.go|\
|
||||||
channels/app/slashcommands/command_test.go|\
|
channels/app/slashcommands/command_test.go|\
|
||||||
channels/app/slashcommands/helper_test.go|\
|
channels/app/slashcommands/helper_test.go|\
|
||||||
channels/app/status.go|\
|
|
||||||
channels/app/status_test.go|\
|
channels/app/status_test.go|\
|
||||||
channels/app/support_packet_test.go|\
|
channels/app/support_packet_test.go|\
|
||||||
channels/app/team.go|\
|
channels/app/team.go|\
|
||||||
|
|||||||
@@ -98,13 +98,15 @@ func (a *App) SetCustomStatus(c request.CTX, userID string, cs *model.CustomStat
|
|||||||
return err
|
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)
|
_, updateErr := a.UpdateUser(c, user, true)
|
||||||
if updateErr != nil {
|
if updateErr != nil {
|
||||||
return updateErr
|
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))
|
c.Logger().Error("Can't add recent custom status for", mlog.String("userID", userID), mlog.Err(err))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user