MM-23620: Handle error from GetUser (#14204)
* MM-23620: Handle error from GetUser In case of high DB load, the DB will start to throw errors. Unless we handle the error appropriately, the server will crash. * Removing unnecessary lines
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
6fef02ed6c
Коммит
ef209c5e0b
@@ -2113,7 +2113,11 @@ func (a *App) MarkChannelsAsViewed(channelIds []string, userId string, currentSe
|
||||
|
||||
notify := member.NotifyProps[model.PUSH_NOTIFY_PROP]
|
||||
if notify == model.CHANNEL_NOTIFY_DEFAULT {
|
||||
user, _ := a.GetUser(userId)
|
||||
user, err := a.GetUser(userId)
|
||||
if err != nil {
|
||||
mlog.Warn("Failed to get user", mlog.String("user_id", userId), mlog.Err(err))
|
||||
continue
|
||||
}
|
||||
notify = user.NotifyProps[model.PUSH_NOTIFY_PROP]
|
||||
}
|
||||
if notify == model.USER_NOTIFY_ALL {
|
||||
|
||||
Ссылка в новой задаче
Block a user