Skip to content

Commit 3f8f6f7

Browse files
committed
Fixed throwing exception while downloading non-downloadable media files (e.g. contacts)
1 parent f93f500 commit 3f8f6f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

telegram2elastic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ async def write_message(self, message, is_chat_enabled: callable):
201201
logging.debug("Skipping message {} from chat '{}' as chat type {} is not enabled".format(message.id, chat_display_name, chat_type.value if chat_type else None))
202202
return
203203

204-
if message.media and self.media_config.get("download_path"):
204+
if message.file and self.media_config.get("download_path"):
205205
downloaded_media = await self.download_media(message)
206206
else:
207207
downloaded_media = None

0 commit comments

Comments
 (0)