Fix telethon issue #4051
Fixes error that caused logout from all devices
Hi @tigra323. Could you please explain how this works?
If you do not set these parameters, then after the program logs into your account, Telegram will log out from all devices
Was checking the docs: https://docs.telethon.dev/en/stable/modules/client.html#telethon.client.telegrambaseclient.TelegramBaseClient
The lib automatically sets these params. Doesn't look like it's necessary to hardcode values.
device_model ([str](https://docs.python.org/3/library/stdtypes.html#str), optional):
“Device model” to be sent when creating the initial connection. Defaults to ‘PC (n)bit’ derived from platform.uname().machine, or its direct value if unknown.
system_version ([str](https://docs.python.org/3/library/stdtypes.html#str), optional):
“System version” to be sent when creating the initial connection. Defaults to platform.uname().release stripped of everything ahead of -.
app_version ([str](https://docs.python.org/3/library/stdtypes.html#str), optional):
“App version” to be sent when creating the initial connection. Defaults to telethon.version.__version__.
lang_code ([str](https://docs.python.org/3/library/stdtypes.html#str), optional):
“Language code” to be sent when creating the initial connection. Defaults to 'en'.
If you do not set these parameters, then after the program logs into your account, Telegram will log out from all devices
Was that happening to you?
I just logged into my account with tg-archive and none of my devices were logged out.
maybe it's because of the old version of Telethon that was required before or something else. But when I used Telethon before I was constantly getting out of all devices, adding these parameters helped me, but it’s strange that even after installing tg-archive, which updated Telethon to version 1.29.3 (required then) when I used tg-archive I got out of all devices again, but after adding these parameters I no longer got out of devices