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 a text. 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!
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