Skip to content

Commit

Permalink
Fix bug in 82d7e78
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Nov 15, 2018
1 parent 983f500 commit 3d3afdb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions mautrix_telegram/portal.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,10 +795,8 @@ async def mark_read(self, user: 'u.User', event_id: MatrixEventID) -> None:
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":
Expand Down

0 comments on commit 3d3afdb

Please sign in to comment.