Sha256: dc440f0f6fe1be4be775012f5946e2805eb5b4041b55f8b732ff0879e40fb816
Contents?: true
Size: 1.14 KB
Versions: 4
Compression:
Stored size: 1.14 KB
Contents
diff --git a/lib/slack/web/api/endpoints/chat.rb b/lib/slack/web/api/endpoints/chat.rb index e1c409d..3b24fea 100644 --- a/lib/slack/web/api/endpoints/chat.rb +++ b/lib/slack/web/api/endpoints/chat.rb @@ -120,9 +120,8 @@ module Slack # @see https://api.slack.com/methods/chat.postEphemeral # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.postEphemeral.json def chat_postEphemeral(options = {}) - throw ArgumentError.new('Required arguments :attachments missing') if options[:attachments].nil? throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? - throw ArgumentError.new('Required arguments :text missing') if options[:text].nil? + throw ArgumentError.new('Required arguments :text or :attachments missing') if options[:text].nil? && options[:attachments].nil? throw ArgumentError.new('Required arguments :user missing') if options[:user].nil? options = options.merge(user: users_id(options)['user']['id']) if options[:user] # attachments must be passed as an encoded JSON string
Version data entries
4 entries across 4 versions & 1 rubygems