Use get_contact() instead of create_contact()

This commit is contained in:
Hocuri
2020-10-22 21:41:09 +02:00
committed by holger krekel
parent 1ce1a01d49
commit 41b2dee4ca
2 changed files with 16 additions and 8 deletions

View File

@@ -371,7 +371,7 @@ class Chat(object):
:raises ValueError: if contact could not be removed
:returns: None
"""
contact = self.account.create_contact(obj)
contact = self.account.get_contact(obj)
ret = lib.dc_remove_contact_from_chat(self.account._dc_context, self.id, contact.id)
if ret != 1:
raise ValueError("could not remove contact {!r} from chat".format(contact))