mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-02-03 00:31:25 -08:00
post-reply soft-deletion: also replace content for activitypub retrievals
This commit is contained in:
parent
3196c2cb79
commit
a627de0985
1 changed files with 7 additions and 0 deletions
|
@ -220,6 +220,13 @@ def comment_model_to_json(reply: PostReply) -> dict:
|
|||
}
|
||||
if reply.edited_at:
|
||||
reply_data['updated'] = ap_datetime(reply.edited_at)
|
||||
if reply.deleted:
|
||||
if reply.deleted_by == reply.user_id:
|
||||
reply_data['content'] = '<p>Deleted by author</p>'
|
||||
reply_data['source']['content'] = 'Deleted by author'
|
||||
else:
|
||||
reply_data['content'] = '<p>Deleted by moderator</p>'
|
||||
reply_data['source']['content'] = 'Deleted by moderator'
|
||||
return reply_data
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue