mirror of
https://github.com/chatmail/core.git
synced 2026-04-06 07:32:12 +03:00
fix(python): Message::is_outgoing: Don't reload message from db
There's no need to load an updated message state from the db to implement `is_outgoing()` and also this function is implicitly called in some tests where a message is already trashed and a call to `dc_get_msg()` generates an unexpected error.
This commit is contained in:
@@ -395,7 +395,7 @@ class Message:
|
||||
|
||||
def is_outgoing(self):
|
||||
"""Return True if Message is outgoing."""
|
||||
return self._msgstate in (
|
||||
return lib.dc_msg_get_state(self._dc_msg) in (
|
||||
const.DC_STATE_OUT_PREPARING,
|
||||
const.DC_STATE_OUT_PENDING,
|
||||
const.DC_STATE_OUT_FAILED,
|
||||
|
||||
Reference in New Issue
Block a user