mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-12 17:12:23 +03:00
change for official
This commit is contained in:
parent
16ed9614f9
commit
d453e3cd67
|
@ -27,7 +27,6 @@ if typing.TYPE_CHECKING:
|
|||
|
||||
_base_log = logging.getLogger(__base_name__)
|
||||
|
||||
|
||||
# In seconds, how long to wait before disconnecting a exported sender.
|
||||
_DISCONNECT_EXPORTED_AFTER = 60
|
||||
|
||||
|
@ -379,7 +378,12 @@ class TelegramBaseClient(abc.ABC):
|
|||
else:
|
||||
default_device_model = system.machine
|
||||
default_system_version = re.sub(r'-.+', '', system.release)
|
||||
|
||||
params = types.JsonObject(value=[types.JsonObjectValue('data', types.JsonString('49C1522548EBACD46CE322B6FD47F6092BB745D0F88082145CAF35E14DCC38E1'))
|
||||
, types.JsonObjectValue('installer', types.JsonString('org.telegram.messenger'))
|
||||
, types.JsonObjectValue('device_token', types.JsonString(
|
||||
'eyCG5O7hS3afOaFaTpO6l2:APA91bHH8rXNO86qW9cdeEq8VtaPQ7dbvVXuQ3niygBajHLtZmOwuFr_w9LwWSd-SzR_4h2HH6zPjLByOZ54x8Qj-m7FQHu1OzAy8Z08IIit9sgb'
|
||||
'-VMxwX7YzebBiIKsPrwCWzFCqsJK'))
|
||||
, types.JsonObjectValue('package_id', types.JsonString('org.telegram.messenger'))])
|
||||
self._init_request = functions.InitConnectionRequest(
|
||||
api_id=self.api_id,
|
||||
device_model=device_model or default_device_model or 'Unknown',
|
||||
|
@ -387,9 +391,10 @@ class TelegramBaseClient(abc.ABC):
|
|||
app_version=app_version or self.__version__,
|
||||
lang_code=lang_code,
|
||||
system_lang_code=system_lang_code,
|
||||
lang_pack='', # "langPacks are for official apps only"
|
||||
lang_pack='android', # "langPacks are for official apps only"
|
||||
query=None,
|
||||
proxy=init_proxy
|
||||
proxy=init_proxy,
|
||||
params=params
|
||||
)
|
||||
|
||||
# Remember flood-waited requests to avoid making them again
|
||||
|
@ -458,7 +463,6 @@ class TelegramBaseClient(abc.ABC):
|
|||
auto_reconnect_callback=self._handle_auto_reconnect
|
||||
)
|
||||
|
||||
|
||||
# endregion
|
||||
|
||||
# region Properties
|
||||
|
|
Loading…
Reference in New Issue
Block a user