comments: rework deleted comments.

Let users see when a post has deleted comments. Show normal users a
'[deleted]' placeholder when a comment is deleted. Show the full comment
to moderators.

Also fix it so that the comment creator can't edit or undelete deleted
comments, and users can't vote on or report deleted comments.

Finally, hide the creator_id, updater_id, and body of deleted comments
in the API.
This commit is contained in:
evazion
2021-01-19 03:31:53 -06:00
parent 07bdc6eab0
commit e1e3604f46
7 changed files with 141 additions and 53 deletions

View File

@@ -15,6 +15,15 @@
* You can now see the list of comments and forum posts you've reported to
the moderators at <https://danbooru.donmai.us/moderation_reports>.
* You can now see when a post has deleted comments. Deleted comments are now
replaced with the word `[deleted]`, instead of being completely hidden.
### API Changes
* Deleted comments now have some of their fields hidden in the API. The
`creator_id`, `updater_id`, and `body` fields are hidden if you're not a
moderator.
## 2021-01-12
### Changes