Migrate to idiomatic error handling app/notification*.go (#9487)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
a8c01377bc
Коммит
a6fa2b72d1
@@ -35,19 +35,17 @@ func (a *App) SendNotifications(post *model.Post, team *model.Team, channel *mod
|
||||
fchan = a.Srv.Store.FileInfo().GetForPost(post.Id, true, true)
|
||||
}
|
||||
|
||||
var profileMap map[string]*model.User
|
||||
if result := <-pchan; result.Err != nil {
|
||||
result := <-pchan
|
||||
if result.Err != nil {
|
||||
return nil, result.Err
|
||||
} else {
|
||||
profileMap = result.Data.(map[string]*model.User)
|
||||
}
|
||||
profileMap := result.Data.(map[string]*model.User)
|
||||
|
||||
var channelMemberNotifyPropsMap map[string]model.StringMap
|
||||
if result := <-cmnchan; result.Err != nil {
|
||||
result = <-cmnchan
|
||||
if result.Err != nil {
|
||||
return nil, result.Err
|
||||
} else {
|
||||
channelMemberNotifyPropsMap = result.Data.(map[string]model.StringMap)
|
||||
}
|
||||
channelMemberNotifyPropsMap := result.Data.(map[string]model.StringMap)
|
||||
|
||||
mentionedUserIds := make(map[string]bool)
|
||||
threadMentionedUserIds := make(map[string]string)
|
||||
|
||||
Ссылка в новой задаче
Block a user