Sha256: 97950f20b9b3999a916a77c4b1cc5f8a356d4f34f528260be563bd1e0bbb917b

Contents?: true

Size: 786 Bytes

Versions: 15

Compression:

Stored size: 786 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/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

15 entries across 15 versions & 1 rubygems

Version Path
slack-ruby-client-0.10.0 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.9.1 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.9.0 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.8.1 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.8.0 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.7.9 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.7.8 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.7.7 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.7.6 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.7.5 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.7.4 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.7.3 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.7.2 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.7.1 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.7.0 lib/slack/web/api/patches/chat.1.text-attachments-required.patch