[MM-23264] Get channel member counts by group (#14068)

* MM-23264 Add api endpoint for get groups with members in channel

Add store tests

Add tests for api func

Gofmt

Apply changes from code review

* MM-23264 Make store layers

* MM-23264 Check read permission on channel member counts

* Trigger CI
Этот коммит содержится в:
Farhan Munshi
2020-04-24 17:12:54 -04:00
коммит произвёл GitHub
родитель e39569b358
Коммит 036f9384b4
11 изменённых файлов: 446 добавлений и 0 удалений

Просмотреть файл

@@ -5004,3 +5004,12 @@ func (c *Client4) PatchChannelModerations(channelID string, patch []*ChannelMode
defer closeBody(r)
return ChannelModerationsFromJson(r.Body), BuildResponse(r)
}
func (c *Client4) GetChannelMemberCountsByGroup(channelID string, includeTimezones bool, etag string) ([]*ChannelMemberCountByGroup, *Response) {
r, err := c.DoApiGet(c.GetChannelRoute(channelID)+"/member_counts_by_group?include_timezones="+strconv.FormatBool(includeTimezones), etag)
if err != nil {
return nil, BuildErrorResponse(r, err)
}
defer closeBody(r)
return ChannelMemberCountsByGroupFromJson(r.Body), BuildResponse(r)
}