Open ts-3156 opened 3 years ago
2 Warnings | |
---|---|
:warning: | There're library changes, but not tests. That's OK as long as you're refactoring existing code. |
:warning: | Unless you're refactoring existing code or improving documentation, please update CHANGELOG.md. |
Here's an example of a CHANGELOG.md entry:
* [#375](https://github.com/slack-ruby/slack-ruby-client/pull/375): Set a default filename so that slack displays the preview correctly - [@ts-3156](https://github.com/ts-3156).
Generated by :no_entry_sign: Danger
This file is generated, so you'll need to introduce this as a patch, or we'll lose the change next update of the web API, see https://github.com/slack-ruby/slack-ruby-client/blob/master/CONTRIBUTING.md#patching-slack-web-api. It will also need tests and a README change. Thanks!
Starting at 2021/05/05 05:30 UTC, Slack client no longer correctly displays previews of images when filename is not specified via slack-ruby-client gem.
The reason of this behavior is that when a filename is not set to both
Faraday::UploadIO.new
andSlack::Web::Client.new.files_upload
, multipart-post gem setslocal.path
as a filename. Iflocal.path
is specified as the filename, Slack will recognize the file as binary and will not show the image preview. In this pull request, I specify the default filename to avoid this behavior.The solution of specifying a default filename may be out of scope for slack-ruby-client gem. If you think so, please feel free to close this pull request.