Merge pull request #989 from andvch/patch-1

Fix broken text_mention html formatting
This commit is contained in:
Badiboy 2020-10-15 11:57:38 +03:00 committed by GitHub
commit 37c09406d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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