Sha256: c6e73cd4d64ac4c41228c171a0f0569df2ca3aab4a70334d0ee0a9a5b3e23fdc

Contents?: true

Size: 782 Bytes

Versions: 5

Compression:

Stored size: 782 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

5 entries across 5 versions & 1 rubygems

Version Path
slack-ruby-client-0.5.3 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.5.2 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.5.1 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.5.0 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.4.0 lib/slack/web/api/patches/chat.1.text-attachments-required.patch