mirror of
https://github.com/deltachat/deltachat-core.git
synced 2025-10-03 17:59:19 +02:00
parent
fa150b4d6f
commit
0c54f8bd76
1 changed files with 11 additions and 0 deletions
|
@ -231,6 +231,17 @@ class Chat(object):
|
||||||
if ret != 1:
|
if ret != 1:
|
||||||
raise ValueError("could not add contact {!r} to chat".format(contact))
|
raise ValueError("could not add contact {!r} to chat".format(contact))
|
||||||
|
|
||||||
|
def remove_contact(self, contact):
|
||||||
|
""" remove a contact from this chat.
|
||||||
|
|
||||||
|
:params: contact object.
|
||||||
|
:exception: ValueError if contact could not be removed
|
||||||
|
:returns: None
|
||||||
|
"""
|
||||||
|
ret = lib.dc_remove_contact_from_chat(self._dc_context, self.id, contact.id)
|
||||||
|
if ret != 1:
|
||||||
|
raise ValueError("could not remove contact {!r} from chat".format(contact))
|
||||||
|
|
||||||
def get_contacts(self):
|
def get_contacts(self):
|
||||||
""" get all contacts for this chat.
|
""" get all contacts for this chat.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue