From 2a773a25e89b0faa3589156cd4642d60573e7f94 Mon Sep 17 00:00:00 2001 From: msramalho <19508417+msramalho@users.noreply.github.com> Date: Thu, 1 Feb 2024 15:08:23 +0000 Subject: [PATCH] better handling of telethon data display --- src/auto_archiver/archivers/telethon_archiver.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/auto_archiver/archivers/telethon_archiver.py b/src/auto_archiver/archivers/telethon_archiver.py index 14a0ac1..c54d026 100644 --- a/src/auto_archiver/archivers/telethon_archiver.py +++ b/src/auto_archiver/archivers/telethon_archiver.py @@ -146,8 +146,10 @@ class TelethonArchiver(Archiver): logger.debug(f"Empty media found, skipping {str(mp)=}") continue result.add_media(Media(filename)) - - result.set_content(str(post)).set_title(title).set_timestamp(post.date) + + result.set_title(title).set_timestamp(post.date).set("api_data", post.to_dict()) + if post.message != title: + result.set_content(post.message) return result.success("telethon") def _get_media_posts_in_group(self, chat, original_post, max_amp=10):