Fix saving created portals and use mxid as title by default

This commit is contained in:
Tulir Asokan
2018-03-11 13:41:05 +02:00
parent 54d2b4bba8
commit 88a8404898
2 changed files with 2 additions and 3 deletions
+1 -3
View File
@@ -258,7 +258,7 @@ async def confirm_bridge(evt: CommandEvent):
async def _get_initial_state(evt: CommandEvent):
state = await evt.az.intent.get_room_state(evt.room_id)
title = None
title = evt.room_id
about = None
levels = None
for event in state:
@@ -282,8 +282,6 @@ async def create(evt: CommandEvent):
return await evt.reply("This is already a portal room.")
title, about, levels = await _get_initial_state(evt)
if not title:
return await evt.reply("Please set a title before creating a Telegram chat.")
supergroup = type == "supergroup"
type = {
+1
View File
@@ -862,6 +862,7 @@ class Portal:
self.tg_receiver = self.tgid
self.by_tgid[self.tgid_full] = self
await self.update_info(source, entity)
self.db.add(self.db_instance)
self.save()
if self.bot and self.bot.tgid in invites: