Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR builds on top of #67 and makes accessible the files of the attachments. One use case of this is to delete the files after they've been received. Both to avoid running out of space in the hard drive and because if the chat has an expiration date, the files should be automatically removed after that time. The second is for now theoretical, as the rest-api does not support yet the message expiration, there was a PR that added that but it was never merged.
I think the best solution for attachments is to have a class that makes all the attributes available to the bot. However, that is a bit of a big ask for now. For inspiration, I did exactly that in the semaphore repo lwesterhof/semaphore#51