Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allows either unfurl_id & source or channel & ts in chat.unfurl method #502

Closed
wants to merge 1 commit into from

Conversation

muhsin-k
Copy link

@muhsin-k muhsin-k commented Nov 1, 2023

Fixes #388

@muhsin-k muhsin-k marked this pull request as ready for review November 1, 2023 08:57
@dangerpr-bot
Copy link

1 Warning
⚠️ Unless you're refactoring existing code or improving documentation, please update CHANGELOG.md.

Here's an example of a CHANGELOG.md entry:

* [#502](https://github.com/slack-ruby/slack-ruby-client/pull/502): Feat: allows either unfurl_id & source or channel & ts in `chat.unfurl` method - [@muhsin-k](https://github.com/muhsin-k).

Generated by 🚫 Danger

if options[:unfurl_id].nil? || options[:source].nil?
raise ArgumentError, 'Either a combination of :channel and :ts or :unfurl_id and :source is required'
end
end
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is generated, so you'll have to either make a patch in https://github.com/slack-ruby/slack-ruby-client/tree/master/lib/slack/web/api/patches, or figure out a way to specify mutually exclusive options.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note the code as is would allow channel and source, so you will want to do something else.

@muhsin-k muhsin-k closed this Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chat.unfurl allows unfurl_id and source instead of channel and ts
3 participants