mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 09:26:37 +03:00
Add new format to resolve invite link (#1670)
This commit is contained in:
parent
82d25a7e52
commit
c0ed709adf
|
@ -1289,9 +1289,15 @@ def resolve_invite_link(link):
|
|||
payload = _decode_telegram_base64(link_hash)
|
||||
|
||||
try:
|
||||
return struct.unpack('>LLQ', payload)
|
||||
if len(payload) == 12:
|
||||
return 0, *struct.unpack('>LQ', payload)
|
||||
elif len(payload) == 16:
|
||||
return struct.unpack('>LLQ', payload)
|
||||
else:
|
||||
pass
|
||||
except (struct.error, TypeError):
|
||||
return None, None, None
|
||||
pass
|
||||
return None, None, None
|
||||
|
||||
|
||||
def resolve_inline_message_id(inline_msg_id):
|
||||
|
|
Loading…
Reference in New Issue
Block a user