api(deltachat-rpc-client): add Message.get_sender_contact()

This commit is contained in:
link2xt
2023-11-17 15:01:33 +00:00
committed by holger krekel
parent f39acbc037
commit 3dc6fd5c10

View File

@@ -42,6 +42,10 @@ class Message:
return AttrDict(reactions)
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:
"""Mark the message as seen."""
self._rpc.markseen_msgs(self.account.id, [self.id])