get all contacts for this chat. :returns: list of :class:`deltachat.contact.Contact` objects for this chat.
(self)
| 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.""" |