Compare commits
3 Commits
v0.4.0-rc1
...
v0.4.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 1994ce38eb | |||
| 9aad6de823 | |||
| 3d3afdb645 |
@@ -1,2 +1,2 @@
|
|||||||
__version__ = "0.4.0rc1"
|
__version__ = "0.4.0"
|
||||||
__author__ = "Tulir Asokan <tulir@maunium.net>"
|
__author__ = "Tulir Asokan <tulir@maunium.net>"
|
||||||
|
|||||||
@@ -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