From 9e003f8ff97a1962f483c10875a7c2d84c71207c Mon Sep 17 00:00:00 2001 From: Max Sandholm Date: Thu, 21 Sep 2017 14:42:12 +0300 Subject: [PATCH] Remove "(Telegram)" from mentions --- telematrix/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telematrix/__init__.py b/telematrix/__init__.py index 8d3992e..5b069a9 100644 --- a/telematrix/__init__.py +++ b/telematrix/__init__.py @@ -97,7 +97,7 @@ def format_matrix_msg(form, content): :return: The formatted string. """ if 'format' in content and content['format'] == 'org.matrix.custom.html': - sanitized = re.sub("(.+?)".format(MATRIX_HOST_BARE), "\\2", content['formatted_body']) + sanitized = re.sub("(.+?) \(Telegram\)".format(MATRIX_HOST_BARE), "\\2", content['formatted_body']) sanitized = sanitize_html(sanitized) return html.escape(form).format(sanitized), 'HTML' else: