fix: 管理删评对公众剥离作者身份,评论者本人仍可见原文

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-17 04:44:37 +08:00
parent 4b93739468
commit c9d27b2b0c
10 changed files with 405 additions and 174 deletions

View File

@@ -546,10 +546,12 @@ export default async function PostDetailPage({ params, searchParams }: PageProps
"@type": "Comment",
text: acceptedAnswer.content,
dateCreated: acceptedAnswer.created_at,
author: {
"@type": "Person",
name: acceptedAnswer.user.nickname || acceptedAnswer.user.username,
},
author: acceptedAnswer.user
? {
"@type": "Person",
name: acceptedAnswer.user.nickname || acceptedAnswer.user.username,
}
: undefined,
url: `#comment-${acceptedAnswer.id}`,
},
}),