Sha256: 602d95334e17ff87c019b04d86bc1f31588a14cccc9fb32c509b4178fe99414b

Contents?: true

Size: 790 Bytes

Versions: 12

Compression:

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

12 entries across 12 versions & 1 rubygems

Version Path
slack-ruby-client-0.14.6 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.14.5 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.14.4 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.14.3 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.14.2 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.14.1 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.14.0 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.13.1 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.13.0 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.12.0 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.11.1 lib/slack/web/api/patches/chat.1.text-attachments-required.patch
slack-ruby-client-0.11.0 lib/slack/web/api/patches/chat.1.text-attachments-required.patch