[MM-26532] Support "active" filter on profile search (#14923)
* Support "active" filter on profile search * Add tests for active user filter
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
bec2f366a7
Коммит
11bc28b5fb
@@ -939,6 +939,17 @@ func (c *Client4) GetRecentlyActiveUsersInTeam(teamId string, page int, perPage
|
||||
return UserListFromJson(r.Body), BuildResponse(r)
|
||||
}
|
||||
|
||||
// GetActiveUsersInTeam returns a page of users on a team. Page counting starts at 0.
|
||||
func (c *Client4) GetActiveUsersInTeam(teamId string, page int, perPage int, etag string) ([]*User, *Response) {
|
||||
query := fmt.Sprintf("?active=true&in_team=%v&page=%v&per_page=%v", teamId, page, perPage)
|
||||
r, err := c.DoApiGet(c.GetUsersRoute()+query, etag)
|
||||
if err != nil {
|
||||
return nil, BuildErrorResponse(r, err)
|
||||
}
|
||||
defer closeBody(r)
|
||||
return UserListFromJson(r.Body), BuildResponse(r)
|
||||
}
|
||||
|
||||
// GetUsersNotInTeam returns a page of users who are not in a team. Page counting starts at 0.
|
||||
func (c *Client4) GetUsersNotInTeam(teamId string, page int, perPage int, etag string) ([]*User, *Response) {
|
||||
query := fmt.Sprintf("?not_in_team=%v&page=%v&per_page=%v", teamId, page, perPage)
|
||||
|
||||
Ссылка в новой задаче
Block a user