diff --git a/CHANGELOG.md b/CHANGELOG.md index a32589c93..da21e3e9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +### Fixes + +- deltachat-rpc-client: fix bug in client.py and add missing `EventType.MSG_DELETED` + ## [1.118.0] - 2023-07-07 ### API-Changes diff --git a/deltachat-rpc-client/src/deltachat_rpc_client/client.py b/deltachat-rpc-client/src/deltachat_rpc_client/client.py index 5205a1ed9..97d470824 100644 --- a/deltachat-rpc-client/src/deltachat_rpc_client/client.py +++ b/deltachat-rpc-client/src/deltachat_rpc_client/client.py @@ -155,7 +155,7 @@ class Client: async def _on_new_msg(self, snapshot: AttrDict) -> None: event = AttrDict(command="", payload="", message_snapshot=snapshot) - if not snapshot.is_info and snapshot.text.startswith(COMMAND_PREFIX): + if not snapshot.is_info and (snapshot.text or "").startswith(COMMAND_PREFIX): await self._parse_command(event) await self._on_event(event, NewMessage) diff --git a/deltachat-rpc-client/src/deltachat_rpc_client/const.py b/deltachat-rpc-client/src/deltachat_rpc_client/const.py index 3ca606617..c17ca8637 100644 --- a/deltachat-rpc-client/src/deltachat_rpc_client/const.py +++ b/deltachat-rpc-client/src/deltachat_rpc_client/const.py @@ -45,6 +45,7 @@ class EventType(str, Enum): MSG_DELIVERED = "MsgDelivered" MSG_FAILED = "MsgFailed" MSG_READ = "MsgRead" + MSG_DELETED = "MsgDeleted" CHAT_MODIFIED = "ChatModified" CHAT_EPHEMERAL_TIMER_MODIFIED = "ChatEphemeralTimerModified" CONTACTS_CHANGED = "ContactsChanged"