merge-requests/30/head
Bob Mottram 2022-12-09 11:25:41 +00:00
parent d3ec685902
commit a1c363e065
1 changed files with 2 additions and 2 deletions

View File

@ -1262,7 +1262,7 @@ def receive_edit_to_post(recent_posts_cache: {}, message_json: {},
message_id = remove_id_ending(message_json['object']['id']) message_id = remove_id_ending(message_json['object']['id'])
if '#' in message_id: if '#' in message_id:
message_id = message_id.split('#', 1)[0] message_id = message_id.split('#', 1)[0]
# find the post which was edited # find the original post which was edited
post_filename = locate_post(base_dir, nickname, domain, message_id) post_filename = locate_post(base_dir, nickname, domain, message_id)
if not post_filename: if not post_filename:
print('EDITPOST: ' + message_id + ' has already expired') print('EDITPOST: ' + message_id + ' has already expired')
@ -1276,7 +1276,7 @@ def receive_edit_to_post(recent_posts_cache: {}, message_json: {},
print('EDITPOST: contains invalid content' + str(message_json)) print('EDITPOST: contains invalid content' + str(message_json))
return False return False
# load the json for the post # load the json for the original post
post_json_object = load_json(post_filename, 1) post_json_object = load_json(post_filename, 1)
if not post_json_object: if not post_json_object:
return False return False