mirror of
https://github.com/chatmail/core.git
synced 2026-05-15 12:56:30 +03:00
api(deltachat-rpc-client): add Account.create_chat()
This commit is contained in:
@@ -104,6 +104,11 @@ class Account:
|
|||||||
obj = obj.get_snapshot().address
|
obj = obj.get_snapshot().address
|
||||||
return Contact(self, self._rpc.create_contact(self.id, obj, name))
|
return Contact(self, self._rpc.create_contact(self.id, obj, name))
|
||||||
|
|
||||||
|
def create_chat(self, account: "Account") -> Chat:
|
||||||
|
addr = account.get_config("addr")
|
||||||
|
contact = self.create_contact(addr)
|
||||||
|
return contact.create_chat()
|
||||||
|
|
||||||
def get_contact_by_id(self, contact_id: int) -> Contact:
|
def get_contact_by_id(self, contact_id: int) -> Contact:
|
||||||
"""Return Contact instance for the given contact ID."""
|
"""Return Contact instance for the given contact ID."""
|
||||||
return Contact(self, contact_id)
|
return Contact(self, contact_id)
|
||||||
|
|||||||
Reference in New Issue
Block a user