Gas/Slack: update API call
What
https://api.slack.com/changelog/2024-04-a-better-way-to-upload-files-is-here-to-stay
The Slack API call files.upload will become deprecated in less than two months, so the gas script needs to be updated
Why
Not only will this make the old bot not work when the deadline happens, the old call is unavailable for newly created bots. Because of some technicalities, it will be easier to create a new bot for the new Slack than migrating the old one, so this change is also necessary to have a bot on the new Slack.
How
https://api.slack.com/messaging/files#uploading_files
Basically, we need three calls. One to get the url to upload to, one to upload to that given URL, and a last one to finalize (which also asks to send the file to a given channel).
Manually testing the MR
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR