Sha256: c07f03570cba4e36a21a4cae86454ccd1834272bc3fb53066cd7c8e71068205d

Contents?: true

Size: 781 Bytes

Versions: 4

Compression:

Stored size: 781 Bytes

Contents

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/dblock/slack-api-ref/blob/master/methods/chat.postMessage.json
           def chat_postMessage(options = {})
             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?
             post('chat.postMessage', options)
           end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
slack-ruby-client-bhe-0.5.5 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-bhe-0.5.4 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.6.0 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.5.4 lib/slack/web/api/patches/chat.1.text-attachments-required.patch