Compare commits

...

1 Commits

Author SHA1 Message Date
adbenitez
b26dccd174 deltachat-rpc-client: fix bug in client.py and add missing EventType.MSG_DELETED 2023-07-23 20:07:10 +02:00
3 changed files with 8 additions and 1 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -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"