From 673a3768b82c354b3ce5aadae11ad39a67ea3433 Mon Sep 17 00:00:00 2001 From: mctaylors Date: Wed, 21 May 2025 04:30:48 +0300 Subject: [PATCH] fix: add more is_banned checks to avoid infinite fetching --- commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands.py b/commands.py index 71bf461..e6e9029 100644 --- a/commands.py +++ b/commands.py @@ -90,7 +90,7 @@ async def info_command(update: Update, context: ContextTypes.DEFAULT_TYPE) -> No f"{html_parser.hyperlink("»", f"http://{app.hostname}/posts?tags=approver:{approver_data['name']}")}") m.append(f"Size: {html_parser.hyperlink( f"{humanize_filesize(post_data['media_asset']['file_size'])} .{post_data['media_asset']['file_ext']}", - post_data['file_url'])} " + "" if post_data['is_banned'] else post_data['file_url'])} " f"({post_data['media_asset']['image_width']}x{post_data['media_asset']['image_height']}) " f"{html_parser.hyperlink("»", f"http://{app.hostname}/media_assets/{post_data['media_asset']['id']}")}") m.append(f"Source: {post_data['source'] if post_data['source'] != "" else "🚫"}")