Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### 3.2.1 (Next)

* [#590](https://github.com/slack-ruby/slack-ruby-client/pull/590): Update API from [slack-api-ref@784d1d4](https://github.com/slack-ruby/slack-api-ref/commit/784d1d4) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
* Your contribution here.

### 3.2.0 (2026/07/05)
Expand Down
8 changes: 4 additions & 4 deletions lib/slack/web/api/endpoints/chat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def chat_postEphemeral(options = {})
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
raise ArgumentError, 'Required arguments :user missing' if options[:user].nil?
raise ArgumentError, 'At least one of :attachments, :blocks, :text, :markdown_text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil? && options[:markdown_text].nil?
raise ArgumentError, ':text, :markdown_text are mutually exclusive' if !options[:text].nil? && !options[:markdown_text].nil?
raise ArgumentError, 'Exactly one of :text, :markdown_text is required' unless options[:text].nil? ^ options[:markdown_text].nil?
options = options.merge(user: users_id(options)['user']['id']) if options[:user]
options = encode_options_as_json(options, %i[attachments blocks])
post('chat.postEphemeral', options)
Expand Down Expand Up @@ -197,7 +197,7 @@ def chat_postEphemeral(options = {})
def chat_postMessage(options = {})
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
raise ArgumentError, 'At least one of :attachments, :blocks, :text, :markdown_text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil? && options[:markdown_text].nil?
raise ArgumentError, ':text, :markdown_text are mutually exclusive' if !options[:text].nil? && !options[:markdown_text].nil?
raise ArgumentError, 'Exactly one of :text, :markdown_text is required' unless options[:text].nil? ^ options[:markdown_text].nil?
options = encode_options_as_json(options, %i[attachments blocks metadata])
post('chat.postMessage', options)
end
Expand Down Expand Up @@ -239,7 +239,7 @@ def chat_scheduleMessage(options = {})
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
raise ArgumentError, 'Required arguments :post_at missing' if options[:post_at].nil?
raise ArgumentError, 'At least one of :attachments, :blocks, :text, :markdown_text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil? && options[:markdown_text].nil?
raise ArgumentError, ':text, :markdown_text are mutually exclusive' if !options[:text].nil? && !options[:markdown_text].nil?
raise ArgumentError, 'Exactly one of :text, :markdown_text is required' unless options[:text].nil? ^ options[:markdown_text].nil?
options = encode_options_as_json(options, %i[attachments blocks metadata])
post('chat.scheduleMessage', options)
end
Expand Down Expand Up @@ -365,7 +365,7 @@ def chat_update(options = {})
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
raise ArgumentError, 'Required arguments :ts missing' if options[:ts].nil?
raise ArgumentError, 'At least one of :attachments, :blocks, :text, :markdown_text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil? && options[:markdown_text].nil?
raise ArgumentError, ':text, :markdown_text are mutually exclusive' if !options[:text].nil? && !options[:markdown_text].nil?
raise ArgumentError, 'Exactly one of :text, :markdown_text is required' unless options[:text].nil? ^ options[:markdown_text].nil?
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
options = encode_options_as_json(options, %i[attachments unfurled_attachments blocks metadata])
post('chat.update', options)
Expand Down
Loading
Loading