From 225ea9c3ab405db0e8665297a64b5c907627c933 Mon Sep 17 00:00:00 2001 From: Danipulok Date: Wed, 20 Nov 2024 16:13:34 +0200 Subject: [PATCH] fix(session): persist session after `session.set_dc` --- telethon/client/telegrambaseclient.py | 1 + 1 file changed, 1 insertion(+) diff --git a/telethon/client/telegrambaseclient.py b/telethon/client/telegrambaseclient.py index df754d9b..95c28532 100644 --- a/telethon/client/telegrambaseclient.py +++ b/telethon/client/telegrambaseclient.py @@ -313,6 +313,7 @@ class TelegramBaseClient(abc.ABC): DEFAULT_IPV6_IP if self._use_ipv6 else DEFAULT_IPV4_IP, DEFAULT_PORT ) + session.save() self.flood_sleep_threshold = flood_sleep_threshold