MCPcopy
hub / github.com/wechaty/python-wechaty / accept

Method accept

src/wechaty/user/room_invitation.py:97–122  ·  view source on GitHub ↗

accept the room invitation Args: self: RoomInvitation object Examples: >>> await invitation.accept() Returns: None

(self)

Source from the content-addressed store, hash-verified

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 """

Callers

nothing calls this directly

Calls 5

inviterMethod · 0.95
topicMethod · 0.95
readyMethod · 0.45

Tested by

no test coverage detected