From 393f9e998b1b40aa59d3fb8794c3a73da38c3fb7 Mon Sep 17 00:00:00 2001 From: Wim Date: Sun, 24 May 2020 00:06:21 +0200 Subject: Update dependencies / vendor (#1146) --- vendor/github.com/slack-go/slack/groups.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'vendor/github.com/slack-go/slack/groups.go') diff --git a/vendor/github.com/slack-go/slack/groups.go b/vendor/github.com/slack-go/slack/groups.go index 23374869..6ea1b134 100644 --- a/vendor/github.com/slack-go/slack/groups.go +++ b/vendor/github.com/slack-go/slack/groups.go @@ -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 +} -- cgit v1.2.3