node-slack-sdk
node-slack-sdk copied to clipboard
Fix update image block type
Summary
This update adds the newly available slack_file object to the imageBlock and sets the image_url to be optional
Requirements (place an x in each [ ])
- [X ] I've read and understood the Contributing Guidelines and have done my best effort to follow them.
- [ X] I've read and agree to the Code of Conduct.
Thanks for the contribution! Before we can merge this, we need @cfeeney5 to sign the Salesforce Inc. Contributor License Agreement.
Thank you for taking the time to send this! As I mentioned at https://github.com/slackapi/node-slack-sdk/issues/1734#issuecomment-1911534468, a similar change is required on the image block element side. Also, we prefer union types for this.
Ive refactored this now for use with unions. UrlImageObject and SlackFileImageObject are exported from block-elements so it can be used there and in blocks. Im not sure which way is preferred.
I've enabled the CI tests for this PR and it seems the linter is now failing. Could you please also fix those up? I think many of the formatting changes you introduced will not be allowed according to our linter configuration / style guide.
#1783 has superseded this PR; closing.
FYI the fix for this has been released to npm as @slack/types v2.12.0.