lib/slack/web/api/endpoints/mpim.rb in slack-ruby-client-0.5.3 vs lib/slack/web/api/endpoints/mpim.rb in slack-ruby-client-0.5.4

- old
+ new

@@ -12,10 +12,11 @@ # MPIM to close. # @see https://api.slack.com/methods/mpim.close # @see https://github.com/dblock/slack-api-ref/blob/master/methods/mpim.close.json def mpim_close(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? + options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] post('mpim.close', options) end # # This method returns a portion of messages/events from the specified multiparty direct message channel. @@ -34,10 +35,11 @@ # Include unread_count_display in the output?. # @see https://api.slack.com/methods/mpim.history # @see https://github.com/dblock/slack-api-ref/blob/master/methods/mpim.history.json def mpim_history(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? + options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] post('mpim.history', options) end # # This method returns a list of all multiparty direct message channels that the user has. @@ -58,9 +60,10 @@ # @see https://api.slack.com/methods/mpim.mark # @see https://github.com/dblock/slack-api-ref/blob/master/methods/mpim.mark.json def mpim_mark(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :ts missing') if options[:ts].nil? + options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] post('mpim.mark', options) end # # This method opens a multiparty direct message.