accept the room invitation Args: self: RoomInvitation object Examples: >>> await invitation.accept() Returns: None
(self)
| 95 | return invitation |
| 96 | |
| 97 | async def accept(self) -> None: |
| 98 | """ |
| 99 | accept the room invitation |
| 100 | Args: |
| 101 | self: RoomInvitation object |
| 102 | Examples: |
| 103 | >>> await invitation.accept() |
| 104 | Returns: |
| 105 | None |
| 106 | """ |
| 107 | log.info('accept() <%s>', self) |
| 108 | await self.puppet.room_invitation_accept( |
| 109 | room_invitation_id=self.invitation_id) |
| 110 | inviter = await self.inviter() |
| 111 | topic = await self.topic() |
| 112 | try: |
| 113 | await inviter.ready() |
| 114 | log.info( |
| 115 | 'accept() with room(%s) & inviter(%s) ready())', |
| 116 | topic, |
| 117 | inviter |
| 118 | ) |
| 119 | except Exception as exception: |
| 120 | message = 'accept() with room(%s) & inviter(%s) error' % (topic, inviter) |
| 121 | log.error(message) |
| 122 | raise WechatyOperationError(message) |
| 123 | |
| 124 | async def inviter(self) -> Contact: |
| 125 | """ |
nothing calls this directly
no test coverage detected