Update dependencies / vendor (#1146)

This commit is contained in:
Wim
2020-05-24 00:06:21 +02:00
committed by GitHub
parent ba0bfe70a8
commit 393f9e998b
438 changed files with 35015 additions and 92744 deletions

View File

@@ -353,3 +353,24 @@ func (api *Client) SetGroupTopicContext(ctx context.Context, group, topic string
}
return response.Topic, nil
}
// GetGroupReplies gets an entire thread (a message plus all the messages in reply to it).
// see https://api.slack.com/methods/groups.replies
func (api *Client) GetGroupReplies(channelID, thread_ts string) ([]Message, error) {
return api.GetGroupRepliesContext(context.Background(), channelID, thread_ts)
}
// GetGroupRepliesContext gets an entire thread (a message plus all the messages in reply to it) with a custom context
// see https://api.slack.com/methods/groups.replies
func (api *Client) GetGroupRepliesContext(ctx context.Context, channelID, thread_ts string) ([]Message, error) {
values := url.Values{
"token": {api.token},
"channel": {channelID},
"thread_ts": {thread_ts},
}
response, err := api.groupRequest(ctx, "groups.replies", values)
if err != nil {
return nil, err
}
return response.History.Messages, nil
}