node-slack-sdk icon indicating copy to clipboard operation
node-slack-sdk copied to clipboard

Fix update image block type

Open cfeeney5 opened this issue 1 year ago • 4 comments

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 [ ])

cfeeney5 avatar Jan 27 '24 18:01 cfeeney5

Thanks for the contribution! Before we can merge this, we need @cfeeney5 to sign the Salesforce Inc. Contributor License Agreement.

salesforce-cla[bot] avatar Jan 27 '24 18:01 salesforce-cla[bot]

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.

seratch avatar Jan 29 '24 05:01 seratch

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.

cfeeney5 avatar Jan 29 '24 21:01 cfeeney5

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.

filmaj avatar Jan 30 '24 15:01 filmaj

#1783 has superseded this PR; closing.

filmaj avatar May 01 '24 13:05 filmaj

FYI the fix for this has been released to npm as @slack/types v2.12.0.

filmaj avatar Jun 05 '24 13:06 filmaj