Replace send_message_super with markdown flag in send_message

This commit is contained in:
Tulir Asokan
2018-03-03 21:02:01 +02:00
parent 0f706d511a
commit 172e472221
3 changed files with 12 additions and 10 deletions
+2 -2
View File
@@ -122,14 +122,14 @@ class Bot(AbstractUser):
async def handle_command(self, message):
def reply(reply_text):
return self.client.send_message_super(message.to_id, reply_text)
return self.client.send_message(message.to_id, reply_text, markdown=True)
text = message.message
portal = po.Portal.get_by_entity(message.to_id)
if text == "/portal" or text == f"/portal@{self.username}":
await self.handle_command_portal(portal, reply)
elif text.startswith("/invite ") or text.startswith(f"/invite@{self.username} "):
await self.handle_command_invite(portal, reply, mxid=text[text.index(" "):])
await self.handle_command_invite(portal, reply, mxid=text[text.index(" ") + 1:])
def handle_service_message(self, message):
to_id = message.to_id