Skip to content

Commit

Permalink
Add include_num_members support to conversation.info request
Browse files Browse the repository at this point in the history
  • Loading branch information
johanmcgwire-cb committed Oct 21, 2021
1 parent 0cd594d commit 2bb1377
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions conversation.go
Expand Up @@ -358,16 +358,17 @@ func (api *Client) CreateConversationContext(ctx context.Context, channelName st
}

// GetConversationInfo retrieves information about a conversation
func (api *Client) GetConversationInfo(channelID string, includeLocale bool) (*Channel, error) {
return api.GetConversationInfoContext(context.Background(), channelID, includeLocale)
func (api *Client) GetConversationInfo(channelID string, includeLocale, includeNumMembers bool) (*Channel, error) {
return api.GetConversationInfoContext(context.Background(), channelID, includeLocale, includeNumMembers)
}

// GetConversationInfoContext retrieves information about a conversation with a custom context
func (api *Client) GetConversationInfoContext(ctx context.Context, channelID string, includeLocale bool) (*Channel, error) {
func (api *Client) GetConversationInfoContext(ctx context.Context, channelID string, includeLocale, includeNumMembers bool) (*Channel, error) {
values := url.Values{
"token": {api.token},
"channel": {channelID},
"include_locale": {strconv.FormatBool(includeLocale)},
"token": {api.token},
"channel": {channelID},
"include_locale": {strconv.FormatBool(includeLocale)},
"include_num_members": {strconv.FormatBool(includeNumMembers)},
}
response, err := api.channelRequest(ctx, "conversations.info", values)
if err != nil {
Expand Down

0 comments on commit 2bb1377

Please sign in to comment.