From 96d639cbf68ea634f461b4f9c4b9a04791b1150d Mon Sep 17 00:00:00 2001 From: Andrey Alekseev Date: Sun, 21 Jul 2024 22:49:37 +0300 Subject: [PATCH 1/2] add device name --- scripts/tg_client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/tg_client.py b/scripts/tg_client.py index cff6a44..2da907e 100644 --- a/scripts/tg_client.py +++ b/scripts/tg_client.py @@ -13,6 +13,7 @@ api_hash = data['api_hash'] cexio_ref_code = data['cexio_ref_code'] blum_ref_code = data['blum_ref_code'] + device_name = data['device_name'] def getUrl(client: TelegramClient, peer: str, bot: str, url: str, platform: str = "ios", start_param: str = ""): return client( @@ -111,7 +112,7 @@ def create_client(api_id, api_hash, admin, cexio_ref_code): f'sessions/{session_name}', api_id, api_hash, - device_model=f"All-In-One(MA)" + device_model=device_name ) print("[INFO] Starting Telegram client...") From 6c0fb4949de95789304e9ff8197898dbd350a581 Mon Sep 17 00:00:00 2001 From: Andrey Alekseev Date: Sun, 21 Jul 2024 23:04:37 +0300 Subject: [PATCH 2/2] add tg version --- scripts/tg_client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/tg_client.py b/scripts/tg_client.py index 2da907e..f977b71 100644 --- a/scripts/tg_client.py +++ b/scripts/tg_client.py @@ -14,6 +14,7 @@ cexio_ref_code = data['cexio_ref_code'] blum_ref_code = data['blum_ref_code'] device_name = data['device_name'] + tg_version = data['tg_version'] def getUrl(client: TelegramClient, peer: str, bot: str, url: str, platform: str = "ios", start_param: str = ""): return client( @@ -114,6 +115,7 @@ def create_client(api_id, api_hash, admin, cexio_ref_code): api_hash, device_model=device_name ) + client.__version__ = tg_version print("[INFO] Starting Telegram client...") client.start()