Add Matrix->Telegram kicking and fix and improve things. Fixes #36

This commit is contained in:
Tulir Asokan
2018-02-01 23:22:08 +02:00
parent 5311facf97
commit e38cf82c40
8 changed files with 112 additions and 61 deletions
+3 -3
View File
@@ -351,14 +351,14 @@ class CommandHandler:
+ f"Use power level 95 instead of 100 for admins.")
supergroup = type == "supergroup"
types = {
type = {
"supergroup": "channel",
"channel": "channel",
"chat": "chat",
"group": "chat",
}
}[type]
portal = po.Portal(tgid=None, mxid=self._room_id, title=title, peer_type=types[type])
portal = po.Portal(tgid=None, mxid=self._room_id, title=title, peer_type=type)
try:
portal.create_telegram_chat(sender, supergroup=supergroup)
except ValueError as e: