Fix minor things

This commit is contained in:
Tulir Asokan
2018-02-06 15:30:30 +02:00
parent d018189c74
commit 9ea0ab3df1
2 changed files with 7 additions and 3 deletions
+6 -2
View File
@@ -334,8 +334,12 @@ class CommandHandler:
updates = sender.client(JoinChannelRequest(channel))
for chat in updates.chats:
portal = po.Portal.get_by_entity(chat)
portal.create_matrix_room(sender, chat, [sender.mxid])
self.reply(f"Created room for {portal.title}")
if portal.mxid:
portal.create_matrix_room(sender, chat, [sender.mxid])
self.reply(f"Created room for {portal.title}")
else:
portal.invite_matrix([sender.mxid])
self.reply(f"Invited you to portal of {portal.title}")
@command_handler
def create(self, sender, args):