From 17520ad6ad34574c901f0dcb5426aca47e26fedd Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 4 May 2023 12:36:48 +0100 Subject: [PATCH] Less verbose debug --- inbox.py | 4 +++- posts.py | 11 +++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/inbox.py b/inbox.py index f54625682..65c249265 100644 --- a/inbox.py +++ b/inbox.py @@ -686,7 +686,9 @@ def save_post_to_inbox_queue(base_dir: str, http_prefix: str, if obj_dict_exists: if is_quote_toot(post_json_object, content_str): - print('REJECT: inbox quote toot ' + str(post_json_object)) + if post_json_object.get('id'): + print('REJECT: inbox quote toot' + + str(post_json_object['id'])) return None # is this a reply to a blocked domain or account? diff --git a/posts.py b/posts.py index 570b10f45..4bb0b6985 100644 --- a/posts.py +++ b/posts.py @@ -5501,7 +5501,9 @@ def download_announce(session, base_dir: str, http_prefix: str, return None if is_question_filtered(base_dir, nickname, domain, system_language, announced_json): - print('REJECT: announced question was filtered') + if announced_json.get('id'): + print('REJECT: announced question was filtered ' + + str(announced_json['id'])) _reject_announce(announce_filename, base_dir, nickname, domain, post_id, recent_posts_cache) @@ -5526,7 +5528,7 @@ def download_announce(session, base_dir: str, http_prefix: str, announced_json['published'].split('.')[0] + 'Z' if not valid_post_date(announced_json['published'], 90, debug): print('WARN: announced post is not recently published ' + - str(announced_json)) + str(announced_json['published'])) _reject_announce(announce_filename, base_dir, nickname, domain, post_id, recent_posts_cache) @@ -5561,8 +5563,9 @@ def download_announce(session, base_dir: str, http_prefix: str, summary_str + ' ' + content_str + ' ' + media_descriptions if is_filtered(base_dir, nickname, domain, content_all, system_language): - print('REJECT: announced post has been filtered ' + - str(announced_json)) + if announced_json.get('id'): + print('REJECT: announced post has been filtered ' + + str(announced_json['id'])) _reject_announce(announce_filename, base_dir, nickname, domain, post_id, recent_posts_cache)