Skip to content

Commit

Permalink
Serialize file (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nimond committed Aug 3, 2021
1 parent 71eedab commit 036a844
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
5 changes: 4 additions & 1 deletion botx/clients/methods/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,10 @@ def build_serialized_dict(
exclude_none=True,
),
)
serialized_dict.update(self.dict(include={"file"}))

# Because exclude_none removes empty file key on message update
if hasattr(self, "file") and self.file is None: # type: ignore # noqa: WPS421
serialized_dict["file"] = None

return serialized_dict

Expand Down
7 changes: 7 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 0.21.2 (Aug 3, 2021)

### Fixed

* `File` is now serializing when sending message.


## 0.21.1 (Jul 28, 2021)

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "botx"
version = "0.21.1"
version = "0.21.2"
description = "A little python framework for building bots for eXpress"
license = "MIT"
authors = [
Expand Down

1 comment on commit 036a844

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Published on https://pybotx.netlify.app as production
🚀 Deployed on https://6109099886f404fbdcabd638--pybotx.netlify.app

Please sign in to comment.