From dff5903c534cac14873ca1809840aa3af319c4c5 Mon Sep 17 00:00:00 2001 From: Randall Lawrence Date: Sun, 22 Sep 2019 01:28:49 +0300 Subject: [PATCH] Forgot uncomment db fetch --- mautrix_telegram/util/file_transfer.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mautrix_telegram/util/file_transfer.py b/mautrix_telegram/util/file_transfer.py index 95b932d6..0230ffe4 100644 --- a/mautrix_telegram/util/file_transfer.py +++ b/mautrix_telegram/util/file_transfer.py @@ -166,9 +166,9 @@ async def transfer_file_to_matrix(client: MautrixTelegramClient, intent: IntentA if not location_id: return None - #db_file = DBTelegramFile.get(location_id) - #if db_file: - # return db_file + db_file = DBTelegramFile.get(location_id) + if db_file: + return db_file try: lock = transfer_locks[location_id] @@ -184,9 +184,9 @@ async def _unlocked_transfer_file_to_matrix(client: MautrixTelegramClient, inten loc_id: str, location: TypeLocation, thumbnail: TypeThumbnail, is_sticker: bool ) -> Optional[DBTelegramFile]: - #db_file = DBTelegramFile.get(loc_id) - #if db_file: - # return db_file + db_file = DBTelegramFile.get(loc_id) + if db_file: + return db_file try: file = await client.download_file(location)