fix(replies): hide author-deleted replies from thread views

This commit is contained in:
plebeius
2026-03-09 21:10:56 +08:00
parent 454c94555d
commit 6954b5bcc9
4 changed files with 17 additions and 7 deletions
+5
View File
@@ -2,12 +2,17 @@ import { BOARD_REPLIES_PREVIEW_VISIBLE_COUNT } from '../constants';
interface CommentLike {
cid?: string | null;
deleted?: boolean;
index?: number;
pendingApproval?: boolean;
state?: string;
timestamp?: number;
}
export function filterRepliesForDisplay<T extends CommentLike>(replies: T[]): T[] {
return replies.filter((reply) => !reply.deleted);
}
/**
* Returns the latest N replies in chronological display order (oldest first).
*