lib/slack/web/api/endpoints/mpim.rb in slack-ruby-client-0.7.7 vs lib/slack/web/api/endpoints/mpim.rb in slack-ruby-client-0.7.8
- old
+ new
@@ -75,9 +75,25 @@
# @see https://github.com/dblock/slack-api-ref/blob/master/methods/mpim/mpim.open.json
def mpim_open(options = {})
throw ArgumentError.new('Required arguments :users missing') if options[:users].nil?
post('mpim.open', options)
end
+
+ #
+ # This method returns an entire thread (a message plus all the messages in reply to it).
+ #
+ # @option options [channel] :channel
+ # Multiparty direct message channel to fetch thread from.
+ # @option options [Object] :thread_ts
+ # Unique identifier of a thread's parent message.
+ # @see https://api.slack.com/methods/mpim.replies
+ # @see https://github.com/dblock/slack-api-ref/blob/master/methods/mpim/mpim.replies.json
+ def mpim_replies(options = {})
+ throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
+ throw ArgumentError.new('Required arguments :thread_ts missing') if options[:thread_ts].nil?
+ options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel]
+ post('mpim.replies', options)
+ end
end
end
end
end
end