Synchronize all users and fix joining chats via invite links, deleting portals

This commit is contained in:
Tulir Asokan
2018-02-19 18:10:14 +02:00
parent 4af4f90a3d
commit 1a1d7e6d90
2 changed files with 21 additions and 7 deletions
+4 -3
View File
@@ -151,11 +151,12 @@ async def join(evt):
for chat in updates.chats:
portal = po.Portal.get_by_entity(chat)
if portal.mxid:
await portal.create_matrix_room(evt.sender, chat, [evt.sender.mxid])
return await evt.reply(f"Created room for {portal.title}")
else:
await portal.invite_matrix([evt.sender.mxid])
return await evt.reply(f"Invited you to portal of {portal.title}")
else:
await evt.reply(f"Creating room for {chat.title}... This might take a while.")
await portal.create_matrix_room(evt.sender, chat, [evt.sender.mxid])
return await evt.reply(f"Created room for {portal.title}")
@command_handler()