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

Merge pull request #1183 from SwissCorePy/master

Fixed a bug in `user_link`
This commit is contained in:
Badiboy 2021-06-09 17:28:13 +03:00 committed by GitHub
commit 74c4ab2f04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -303,7 +303,7 @@ def user_link(user, include_id: bool=False) -> str:
""" """
name = escape(user.first_name) name = escape(user.first_name)
return (f"<a href='tg://user?id={user.id}'>{name}</a>" return (f"<a href='tg://user?id={user.id}'>{name}</a>"
+ f" (<pre>{user.id}</pre>)" if include_id else "") + (f" (<pre>{user.id}</pre>)" if include_id else ""))
# def quick_markup(values: Dict[str, Dict[str, Any]], row_width: int=2): # def quick_markup(values: Dict[str, Dict[str, Any]], row_width: int=2):