Fix saving created portals and use mxid as title by default
This commit is contained in:
@@ -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 = {
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user