diff –git a/lib/slack/web/api/endpoints/chat.rb b/lib/slack/web/api/endpoints/chat.rb index 1f7a8d7..2ec4bed 100644 — a/lib/slack/web/api/endpoints/chat.rb +++ b/lib/slack/web/api/endpoints/chat.rb @@ -49,7 +49,7 @@ module Slack

# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.postMessage.json
def chat_postMessage(options = {})
  throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?

+ throw ArgumentError.new('Required arguments :text or :attachments missing') if options.nil? && options.nil?

  post('chat.postMessage', options)
end