Fix bug in 82d7e78455
This commit is contained in:
@@ -795,10 +795,8 @@ class Portal:
|
|||||||
async def kick_matrix(self, user: Union['u.User', 'p.Puppet'], source: 'u.User') -> None:
|
async def kick_matrix(self, user: Union['u.User', 'p.Puppet'], source: 'u.User') -> None:
|
||||||
if user.tgid == source.tgid:
|
if user.tgid == source.tgid:
|
||||||
return
|
return
|
||||||
if await user.needs_relaybot(self):
|
if await source.needs_relaybot(self):
|
||||||
user = self.bot
|
source = self.bot
|
||||||
if not user:
|
|
||||||
return
|
|
||||||
if self.peer_type == "chat":
|
if self.peer_type == "chat":
|
||||||
await source.client(DeleteChatUserRequest(chat_id=self.tgid, user_id=user.tgid))
|
await source.client(DeleteChatUserRequest(chat_id=self.tgid, user_id=user.tgid))
|
||||||
elif self.peer_type == "channel":
|
elif self.peer_type == "channel":
|
||||||
|
|||||||
Reference in New Issue
Block a user