From 5313b286c68340350eb2efe9dfcdab4ba0b636dd Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 23 Oct 2024 13:39:26 +0100 Subject: [PATCH] Index formatting of post url --- posts.py | 9 +++++---- utils.py | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/posts.py b/posts.py index b8d5f34df..7f2b03404 100644 --- a/posts.py +++ b/posts.py @@ -4882,11 +4882,12 @@ def _create_box_items(base_dir: str, if full_post_filename: # has the post been rejected? if os.path.isfile(full_post_filename + '.reject'): - print('REJECT: rejected post in timeline ' + - boxname + ' ' + post_url + ' ' + - full_post_filename) - remove_post_from_index(post_url + '.json', False, + post_url2 = post_url.replace('/', '#') + '.json' + remove_post_from_index(post_url2, False, index_filename) + print('REJECT: rejected post in timeline ' + + boxname + ' ' + post_url2 + ' ' + + full_post_filename) continue if _add_post_to_timeline(full_post_filename, boxname, diff --git a/utils.py b/utils.py index 8d889dd16..3307b4290 100644 --- a/utils.py +++ b/utils.py @@ -3582,6 +3582,7 @@ def reject_post_id(base_dir: str, nickname: str, domain: str, # if the post is in the inbox index then remove it index_file = \ acct_dir(base_dir, nickname, domain) + '/inbox.index' + post_url = post_url.replace('/', '#') remove_post_from_index(post_url + '.json', debug, index_file)