Skip to content

Commit

Permalink
Added file_ids handling for incoming messages (#558)
Browse files Browse the repository at this point in the history
* Added file_ids handling for incoming messages

* Update mattermostautodriver requirement from ~=1.3.0 to ~=2.0.0 (#464)

* Update mattermostautodriver requirement from ~=1.3.0 to ~=2.0.0

Updates the requirements on [mattermostautodriver](https://github.com/embl-bio-it/python-mattermost-autodriver) to permit the latest version.
- [Changelog](https://github.com/embl-bio-it/python-mattermost-autodriver/blob/main/CHANGELOG.rst)
- [Commits](embl-bio-it/python-mattermost-autodriver@1.3.0...2.0.0)

---
updated-dependencies:
- dependency-name: mattermostautodriver
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update requirements.txt

* Update requirements.txt

* Update requirements.txt

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alex Tzonkov <[email protected]>

* Added file_ids handling for incoming messages

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Sergey Dmitrenko <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alex Tzonkov <[email protected]>
  • Loading branch information
4 people authored Dec 11, 2024
1 parent 4117196 commit 04bf419
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mmpy_bot/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ def channel_id(self):
def channel_name(self):
return self.body["data"]["channel_name"]

@cached_property
def file_ids(self):
return self.body["data"]["post"].get("file_ids", [])

@cached_property
def is_direct_message(self):
return self.body["data"]["channel_type"] == "D"
Expand Down

0 comments on commit 04bf419

Please sign in to comment.