Add Matrix->Telegram location bridging and add user to relaybot files. Fixes #89

This commit is contained in:
Tulir Asokan
2018-03-10 19:53:08 +02:00
parent 7837f03532
commit b06e7932f0
3 changed files with 68 additions and 25 deletions
@@ -273,7 +273,6 @@ def matrix_to_telegram(html: str) -> Tuple[str, List[TypeMessageEntity]]:
if should_bridge_plaintext_highlights:
html = plain_mention_regex.sub(plain_mention_to_html, html)
parser.feed(add_surrogates(html))
print([str(e) for e in parser.entities])
return remove_surrogates(parser.text.strip()), parser.entities
except Exception:
log.exception("Failed to convert Matrix format:\nhtml=%s", html)