From e261c3b9c01f7326ccd443dc84458d8c82df7a4b Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Sat, 20 Apr 2024 20:09:52 +1200 Subject: [PATCH] lemmy requires a summary field when mods delete things --- app/post/routes.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/post/routes.py b/app/post/routes.py index e5874630..06132882 100644 --- a/app/post/routes.py +++ b/app/post/routes.py @@ -1166,6 +1166,8 @@ def post_delete(post_id: int): ], 'object': post.ap_id, } + if post.user_id != current_user.id: + delete_json['summary'] = 'Deleted by mod' if not post.community.is_local(): # this is a remote community, send it to the instance that hosts it success = post_request(post.community.ap_inbox_url, delete_json, current_user.private_key, @@ -1588,6 +1590,8 @@ def post_reply_delete(post_id: int, comment_id: int): ], 'object': post_reply.ap_id, } + if post_reply.user_id != current_user.id: + delete_json['summary'] = 'Deleted by mod' if not post.community.is_local(): # this is a remote community, send it to the instance that hosts it success = post_request(post.community.ap_inbox_url, delete_json, current_user.private_key,