Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ ${
Select tempC.* FROM "Comments" tempC
JOIN T tempTT ON tempTT.id = tempC.thread_id
WHERE deleted_at IS NULL
AND tempC.marked_as_spam_at IS NULL
ORDER BY created_at DESC
LIMIT :withXRecentComments
) COM
Expand Down
6 changes: 6 additions & 0 deletions libs/model/src/utils/getBaseActivityFeed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ const baseActivityQuery = `
WHERE
C.thread_id = T.id
AND C.deleted_at IS NULL
AND C.marked_as_spam_at IS NULL
) C WHERE C.rn <= :comment_limit), '[]') as comments
FROM
gated_output T
Expand Down Expand Up @@ -104,6 +105,11 @@ WITH output_with_topics AS (
JOIN "Communities" C ON C.id = T.community_id
WHERE
T.id IN (:threadIds)
AND T.deleted_at IS NULL
AND T.archived_at IS NULL
AND T.marked_as_spam_at IS NULL
AND C.active IS TRUE
AND C.tier != ${CommunityTierMap.SpamCommunity}
${community_id ? 'AND T.community_id = :community_id' : ''}
${search ? 'AND T.title ILIKE :search' : ''}
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,10 @@ export const ThreadCard = ({
thread?.recentComments?.length > 0 ? (
<div className={clsx('RecentComments', { hideReactionButton })}>
{[...(thread?.recentComments || [])]
?.filter((recentComment) => !recentComment.deleted)
?.filter(
(recentComment) =>
!recentComment.deleted && !recentComment.markedAsSpamAt,
)
?.slice?.(0, maxRecentCommentsToDisplay)
?.sort((a, b) => b.createdAt.unix() - a.createdAt.unix())
?.map((recentComment) => (
Expand Down
Loading