From 81cf37b0eb64d43c83469d8310f5994841d531ef Mon Sep 17 00:00:00 2001 From: Davte Date: Fri, 19 Jul 2019 22:59:32 +0200 Subject: [PATCH] Option to switch off telegram profile linking --- davtelepot/utilities.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/davtelepot/utilities.py b/davtelepot/utilities.py index eb53ea7..fc1fe8b 100644 --- a/davtelepot/utilities.py +++ b/davtelepot/utilities.py @@ -853,7 +853,7 @@ def get_cleaned_text(update, bot=None, replace=[], strip='/ @'): return text.strip(strip) -def get_user(record): +def get_user(record, link_profile=True): """Get an HTML Telegram tag for user `record`.""" if not record: return @@ -864,6 +864,7 @@ def get_user(record): if ( 'id' in from_ and from_['id'] is not None + and link_profile ): result = f"""{{name}}""" if 'username' in from_ and from_['username']: