Check if the room has member `contact`, the return is a Promise and must be `await`-ed Args: contact: the contact to be checked Examples: >>> res = await room.has(contact) Returns: bool: True if the room has member `contact
(self, contact: Contact)
| 618 | return None |
| 619 | |
| 620 | async def has(self, contact: Contact) -> bool: |
| 621 | """ |
| 622 | Check if the room has member `contact`, the return is a Promise and |
| 623 | must be `await`-ed |
| 624 | Args: |
| 625 | contact: the contact to be checked |
| 626 | Examples: |
| 627 | >>> res = await room.has(contact) |
| 628 | Returns: |
| 629 | bool: True if the room has member `contact`, False otherwise |
| 630 | """ |
| 631 | if self.payload is None: |
| 632 | await self.ready() |
| 633 | assert self.payload is not None |
| 634 | return contact.contact_id in self.payload.member_ids |
| 635 | |
| 636 | async def member_list(self, |
| 637 | query: Union[str, RoomMemberQueryFilter] = None |