Initial Support for messages with file attachments #50
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 Pull Request introduces basic support for the 'share' verb, enabling the handling of messages with file attachments.
A key point to note is that there are two patterns of messages with files: those that come with text and those that are sent without any text, containing only the file(s).
For messages without text, the message object retrieved by
self.teams.messages.get(message_base_64_id)
does not contain atext
. An example of such a message object is as follows:When a command is not understood or is absent, the help_command is invoked. So it's important to remember that the help_command will be always executed when a message contains only a file, with no accompanying text.
While I believe there may be a better approach, this PR serves to implement the necessary minimum support. Further improvements can be built upon this foundation.
Please review the changes, and if there are any additional considerations or modifications needed, please let me know. Thank you!
potentially fixes #38