mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Fixed a bug in user_link
`user_link` returned an empty string if `include_id` was set to False
This commit is contained in:
parent
ed5e5e5077
commit
ab05cb0045
@ -303,7 +303,7 @@ def user_link(user: types.User, include_id: bool=False) -> str:
|
||||
"""
|
||||
name = escape(user.first_name)
|
||||
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) -> types.InlineKeyboardMarkup:
|
||||
|
Loading…
Reference in New Issue
Block a user