Migrate "User.GetProfilesByUsernames" to Sync by default (#11523)
* changed GetProfilesByUsernames signature * modified the UserStore interface to reflect changed made to the GetProfilesByUsernames function signature * modify usages of GetProfilesByUsernames * fix gofmt * fixed failing userstore tests
Этот коммит содержится в:
коммит произвёл
Elias Nahum
родитель
aa14c9bbdb
Коммит
c34942afec
@@ -141,8 +141,8 @@ func (a *App) SendNotifications(post *model.Post, team *model.Team, channel *mod
|
||||
}
|
||||
|
||||
if len(m.OtherPotentialMentions) > 0 && !post.IsSystemMessage() {
|
||||
if profilesResult := <-a.Srv.Store.User().GetProfilesByUsernames(m.OtherPotentialMentions, &model.ViewUsersRestrictions{Teams: []string{team.Id}}); profilesResult.Err == nil {
|
||||
channelMentions := model.UserSlice(profilesResult.Data.([]*model.User)).FilterByActive(true)
|
||||
if users, err := a.Srv.Store.User().GetProfilesByUsernames(m.OtherPotentialMentions, &model.ViewUsersRestrictions{Teams: []string{team.Id}}); err == nil {
|
||||
channelMentions := model.UserSlice(users).FilterByActive(true)
|
||||
|
||||
var outOfChannelMentions model.UserSlice
|
||||
var outOfGroupsMentions model.UserSlice
|
||||
|
||||
Ссылка в новой задаче
Block a user