MM-49486: Option to exclude file count in channel stats (#22096)

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Ashish Bhate
2023-01-28 07:33:33 +05:30
коммит произвёл GitHub
родитель 3522419e89
Коммит 58fda05349
3 изменённых файлов: 26 добавлений и 14 удалений

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

@@ -3032,8 +3032,9 @@ func (c *Client4) GetChannel(channelId, etag string) (*Channel, *Response, error
}
// GetChannelStats returns statistics for a channel.
func (c *Client4) GetChannelStats(channelId string, etag string) (*ChannelStats, *Response, error) {
r, err := c.DoAPIGet(c.channelRoute(channelId)+"/stats", etag)
func (c *Client4) GetChannelStats(channelId string, etag string, excludeFilesCount bool) (*ChannelStats, *Response, error) {
route := c.channelRoute(channelId) + fmt.Sprintf("/stats?exclude_files_count=%v", excludeFilesCount)
r, err := c.DoAPIGet(route, etag)
if err != nil {
return nil, BuildResponse(r), err
}