mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-02-04 05:34:41 +03:00
Fix dd mode in MTProxies (#1157)
This commit is contained in:
parent
a7b4794585
commit
8edbfbdced
|
@ -36,7 +36,7 @@ class MTProxyIO:
|
||||||
if is_dd and not is_rand_codec:
|
if is_dd and not is_rand_codec:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"Only RandomizedIntermediate can be used with dd-secrets")
|
"Only RandomizedIntermediate can be used with dd-secrets")
|
||||||
secret = secret[:-1] if is_dd else secret
|
secret = secret[1:] if is_dd else secret
|
||||||
if len(secret) != 16:
|
if len(secret) != 16:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"MTProxy secret must be a hex-string representing 16 bytes")
|
"MTProxy secret must be a hex-string representing 16 bytes")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user