This commit is contained in:
Tulir Asokan
2018-11-15 22:45:48 +02:00
parent 983f5001ab
commit 3d3afdb645
+2 -4
View File
@@ -795,10 +795,8 @@ class Portal:
async def kick_matrix(self, user: Union['u.User', 'p.Puppet'], source: 'u.User') -> None:
if user.tgid == source.tgid:
return
if await user.needs_relaybot(self):
user = self.bot
if not user:
return
if await source.needs_relaybot(self):
source = self.bot
if self.peer_type == "chat":
await source.client(DeleteChatUserRequest(chat_id=self.tgid, user_id=user.tgid))
elif self.peer_type == "channel":