1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Fix broken text_mention html formatting

This commit is contained in:
andvch 2020-10-14 12:06:49 +03:00 committed by GitHub
parent 6dc8173176
commit 36a3ce62c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -503,7 +503,7 @@ class Message(JsonDeserializable):
def func(upd_text, subst_type=None, url=None, user=None): def func(upd_text, subst_type=None, url=None, user=None):
upd_text = upd_text.decode("utf-16-le") upd_text = upd_text.decode("utf-16-le")
if subst_type == "text_mention": if subst_type == "text_mention":
subst_type = "url" subst_type = "text_link"
url = "tg://user?id={0}".format(user.id) url = "tg://user?id={0}".format(user.id)
elif subst_type == "mention": elif subst_type == "mention":
url = "https://t.me/{0}".format(upd_text[1:]) url = "https://t.me/{0}".format(upd_text[1:])