mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 17:36:29 +03:00
api(deltachat-rpc-client): add Message.get_sender_contact()
This commit is contained in:
@@ -42,6 +42,10 @@ class Message:
|
|||||||
return AttrDict(reactions)
|
return AttrDict(reactions)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
def get_sender_contact(self) -> Contact:
|
||||||
|
from_id = self.get_snapshot().from_id
|
||||||
|
return self.account.get_contact_by_id(from_id)
|
||||||
|
|
||||||
def mark_seen(self) -> None:
|
def mark_seen(self) -> None:
|
||||||
"""Mark the message as seen."""
|
"""Mark the message as seen."""
|
||||||
self._rpc.markseen_msgs(self.account.id, [self.id])
|
self._rpc.markseen_msgs(self.account.id, [self.id])
|
||||||
|
|||||||
Reference in New Issue
Block a user