implemented migration to sync (#11413)
Этот коммит содержится в:
коммит произвёл
Jesús Espino
родитель
2193e43aac
Коммит
6ff393527e
@@ -1224,18 +1224,19 @@ func (us SqlUserStore) GetAnyUnreadPostCountForChannel(userId string, channelId
|
||||
})
|
||||
}
|
||||
|
||||
func (us SqlUserStore) Search(teamId string, term string, options *model.UserSearchOptions) store.StoreChannel {
|
||||
return store.Do(func(result *store.StoreResult) {
|
||||
query := us.usersQuery.
|
||||
OrderBy("Username ASC").
|
||||
Limit(uint64(options.Limit))
|
||||
func (us SqlUserStore) Search(teamId string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError) {
|
||||
query := us.usersQuery.
|
||||
OrderBy("Username ASC").
|
||||
Limit(uint64(options.Limit))
|
||||
|
||||
if teamId != "" {
|
||||
query = query.Join("TeamMembers tm ON ( tm.UserId = u.Id AND tm.DeleteAt = 0 AND tm.TeamId = ? )", teamId)
|
||||
}
|
||||
|
||||
*result = us.performSearch(query, term, options)
|
||||
})
|
||||
if teamId != "" {
|
||||
query = query.Join("TeamMembers tm ON ( tm.UserId = u.Id AND tm.DeleteAt = 0 AND tm.TeamId = ? )", teamId)
|
||||
}
|
||||
result := us.performSearch(query, term, options)
|
||||
if result.Err != nil {
|
||||
return nil, result.Err
|
||||
}
|
||||
return result.Data.([]*model.User), nil
|
||||
}
|
||||
|
||||
func (us SqlUserStore) SearchWithoutTeam(term string, options *model.UserSearchOptions) store.StoreChannel {
|
||||
|
||||
Ссылка в новой задаче
Block a user