mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-30 17:59:55 +03:00
Update resolve_invite_link() to support new links
This commit is contained in:
parent
acd4c8648e
commit
2c5aecc986
|
@ -1289,7 +1289,11 @@ def resolve_invite_link(link):
|
|||
payload = _decode_telegram_base64(link_hash)
|
||||
|
||||
try:
|
||||
return struct.unpack('>LLQ', payload)
|
||||
if len(payload) == 12:
|
||||
chat_id, rnd = struct.unpack('>LQ', payload)
|
||||
return 0, chat_id, rnd
|
||||
else:
|
||||
return struct.unpack('>LLQ', payload)
|
||||
except (struct.error, TypeError):
|
||||
return None, None, None
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user