Refactor and clean up code

This commit is contained in:
Tulir Asokan
2018-02-23 21:06:28 +02:00
parent 2aa48f37a9
commit 9e5843a0dc
9 changed files with 257 additions and 186 deletions
+2 -2
View File
@@ -56,11 +56,11 @@ class MatrixHandler:
members = await self.az.intent.get_room_members(room)
except MatrixRequestError:
members = []
if self.az.intent.mxid not in members:
if self.az.bot_mxid not in members:
if len(members) > 1:
await puppet.intent.error_and_leave(room, text=None, html=(
f"Please invite "
f"<a href='https://matrix.to/#/{self.az.intent.mxid}'>the bridge bot</a> "
f"<a href='https://matrix.to/#/{self.az.bot_mxid}'>the bridge bot</a> "
f"first if you want to create a Telegram chat."))
return