Index formatting of post url

main
Bob Mottram 2024-10-23 13:39:26 +01:00
parent 90471ccb26
commit 5313b286c6
2 changed files with 6 additions and 4 deletions

View File

@ -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,

View File

@ -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)