From ab4e582e3e4d01f2290a2c35360fb2d2e6d9f01d Mon Sep 17 00:00:00 2001 From: "ALi.w" Date: Tue, 30 Jan 2024 11:33:36 +0330 Subject: [PATCH] Fix session not getting saved to media_sessions in save_file method. (#20) Signed-off-by: Aliwoto --- pyrogram/methods/advanced/save_file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram/methods/advanced/save_file.py b/pyrogram/methods/advanced/save_file.py index e6a259a9..49b65097 100644 --- a/pyrogram/methods/advanced/save_file.py +++ b/pyrogram/methods/advanced/save_file.py @@ -143,7 +143,7 @@ class SaveFile: session = self.media_sessions.get(dc_id) if not session: - session = Session( + session = self.media_sessions[dc_id] = Session( self, dc_id, await self.storage.auth_key(), await self.storage.test_mode(), is_media=True )