Skip to content

Commit e2ff3d6

Browse files
committed
Remove passport_auth_url
Per discussion at: python-telegram-bot#1168 (review)
1 parent 1d173a0 commit e2ff3d6

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

telegram/utils/helpers.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ def _timestamp(dt_obj):
4848
# Python < 3.3 (incl 2.7)
4949
from time import mktime
5050

51-
5251
def _timestamp(dt_obj):
5352
return mktime(dt_obj.timetuple())
5453

@@ -144,25 +143,3 @@ def effective_message_type(entity):
144143
return i
145144

146145
return None
147-
148-
149-
def passport_auth_url(bot_id, scope, public_key, payload, callback_url=None):
150-
"""
151-
Creates a passport auth url that asks the users for the specified fields
152-
153-
Args:
154-
bot_id (:obj:`int`): Unique identifier for the bot. Can be extracted from the bot token.
155-
scope (List[:obj:`str`]): List the names of fields you want to access.
156-
public_key (:obj:`str`): Public key of your bot.
157-
payload (:obj:`str`): Bot-specified payload
158-
callback_url (:obj:`str`, optional): URL to which the user will be redirected.
159-
160-
"""
161-
url = 'tg://resolve?domain=telegrampassport' + \
162-
'&bot_id={}'.format(bot_id) + \
163-
'&scope={}'.format(quote(scope)) + \
164-
'&public_key={}'.format(quote(public_key)) + \
165-
'&payload={}'.format(quote(payload))
166-
if callback_url:
167-
url += '&callback_url={}'.format(escape(callback_url))
168-
return url

0 commit comments

Comments
 (0)