diff --git a/botx/clients/methods/base.py b/botx/clients/methods/base.py index 5c1fa4f8..7d1b699b 100644 --- a/botx/clients/methods/base.py +++ b/botx/clients/methods/base.py @@ -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 diff --git a/docs/changelog.md b/docs/changelog.md index 31c67d24..39a8cf95 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 2e94942d..973edc5c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 = [