mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 04:52:30 +00:00
Add new format to resolve invite link (#1670)
This commit is contained in:
@@ -1289,8 +1289,14 @@ def resolve_invite_link(link):
|
|||||||
payload = _decode_telegram_base64(link_hash)
|
payload = _decode_telegram_base64(link_hash)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
if len(payload) == 12:
|
||||||
|
return 0, *struct.unpack('>LQ', payload)
|
||||||
|
elif len(payload) == 16:
|
||||||
return struct.unpack('>LLQ', payload)
|
return struct.unpack('>LLQ', payload)
|
||||||
|
else:
|
||||||
|
pass
|
||||||
except (struct.error, TypeError):
|
except (struct.error, TypeError):
|
||||||
|
pass
|
||||||
return None, None, None
|
return None, None, None
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user