api: add JSON-RPC API to get past members

This commit is contained in:
link2xt
2025-01-16 11:38:19 +00:00
committed by l
parent 65a9c4b79b
commit 8dcd8aa69d
4 changed files with 22 additions and 2 deletions

View File

@@ -238,6 +238,11 @@ class Chat:
contacts = self._rpc.get_chat_contacts(self.account.id, self.id)
return [Contact(self.account, contact_id) for contact_id in contacts]
def get_past_contacts(self) -> list[Contact]:
"""Get past contacts for this chat."""
past_contacts = self._rpc.get_past_chat_contacts(self.account.id, self.id)
return [Contact(self.account, contact_id) for contact_id in past_contacts]
def set_image(self, path: str) -> None:
"""Set profile image of this chat.