UserStore migration (#15563)
* Migration completed * Fix tests * Fix tests * Fix tests * Suggestions * Trigger CI * Suggestions * Merge with master * Trigger CI Co-authored-by: Mattermod <mattermod@users.noreply.github.com> Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
d51d843fcd
Коммит
96f1739f8f
@@ -26,7 +26,7 @@ func (a *App) SendNotifications(post *model.Post, team *model.Team, channel *mod
|
||||
pchan := make(chan store.StoreResult, 1)
|
||||
go func() {
|
||||
props, err := a.Srv().Store.User().GetAllProfilesInChannel(channel.Id, true)
|
||||
pchan <- store.StoreResult{Data: props, Err: err}
|
||||
pchan <- store.StoreResult{Data: props, NErr: err}
|
||||
close(pchan)
|
||||
}()
|
||||
|
||||
@@ -58,8 +58,8 @@ func (a *App) SendNotifications(post *model.Post, team *model.Team, channel *mod
|
||||
}
|
||||
|
||||
result := <-pchan
|
||||
if result.Err != nil {
|
||||
return nil, result.Err
|
||||
if result.NErr != nil {
|
||||
return nil, result.NErr
|
||||
}
|
||||
profileMap := result.Data.(map[string]*model.User)
|
||||
|
||||
@@ -504,9 +504,9 @@ func (a *App) filterOutOfChannelMentions(sender *model.User, post *model.Post, c
|
||||
// Filter out inactive users and bots
|
||||
allUsers := model.UserSlice(users).FilterByActive(true)
|
||||
allUsers = allUsers.FilterWithoutBots()
|
||||
allUsers, err = a.FilterUsersByVisible(sender, allUsers)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
allUsers, appErr := a.FilterUsersByVisible(sender, allUsers)
|
||||
if appErr != nil {
|
||||
return nil, nil, appErr
|
||||
}
|
||||
|
||||
if len(allUsers) == 0 {
|
||||
|
||||
Ссылка в новой задаче
Block a user