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)