MCPcopy Create free account
hub / github.com/chatmail/core / get_contacts

Method get_contacts

python/src/deltachat/chat.py:408–418  ·  view source on GitHub ↗

get all contacts for this chat. :returns: list of :class:`deltachat.contact.Contact` objects for this chat.

(self)

Source from the content-addressed store, hash-verified

406 raise ValueError(f"could not remove contact {contact!r} from chat")
407
408 def get_contacts(self):
409 """get all contacts for this chat.
410 :returns: list of :class:`deltachat.contact.Contact` objects for this chat.
411 """
412 from .contact import Contact
413
414 dc_array = ffi.gc(
415 lib.dc_get_chat_contacts(self.account._dc_context, self.id),
416 lib.dc_array_unref,
417 )
418 return list(iter_array(dc_array, lambda id: Contact(self.account, id)))
419
420 def num_contacts(self):
421 """return number of contacts in this chat."""

Calls 2

iter_arrayFunction · 0.85
ContactClass · 0.70