0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Readded deleted comments

no issue

- Hiding deleted comments caused pagination issues.
- Updated text for logged in admins to differentiate between hidden and deleted comments
This commit is contained in:
Simon Backx 2022-07-07 15:41:22 +02:00
parent 838fe784f1
commit 2eabb69be3

View file

@ -28,14 +28,12 @@ const Comment = (props) => {
const isNotPublished = comment.status !== 'published';
const html = {__html: comment.html};
// Hide a comment if it has been deleted by the user and has no replies
// But keep showing comments if hidden by admin and logged in as admin
if ((comment.status === 'deleted' && !hasReplies) || (comment.status === 'hidden' && !hasReplies && !admin)) {
return null;
}
if (isNotPublished) {
html.__html = '<i>This comment has been removed.</i>';
if (admin && comment.status === 'hidden') {
html.__html = '<i>This comment has been hidden.</i>';
} else {
html.__html = '<i>This comment has been removed.</i>';
}
}
if (isInEditMode) {