Fix Matrix->Telegram formatted messages throwing an error

This commit is contained in:
Tulir Asokan
2018-02-18 16:29:19 +02:00
parent 504be22b4b
commit f66c182e82
3 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1,2 +1,2 @@
__version__ = "0.1.0"
__version__ = "0.1.1"
__author__ = "Tulir Asokan <tulir@maunium.net>"
+1 -1
View File
@@ -461,7 +461,7 @@ class Portal:
reply_to = formatter.matrix_reply_to_telegram(message, space, room_id=self.mxid)
if type in {"m.text", "m.emote"}:
if "format" in message and message["format"] == "org.matrix.custom.html":
message, entities = formatter.matrix_to_telegram(message["formatted_body"], space)
message, entities = formatter.matrix_to_telegram(message["formatted_body"])
if type == "m.emote":
message = "/me " + message
response = await sender.client.send_message(self.peer, message, entities=entities,
View File