Skip to content

Commit

Permalink
Hide non-life comments
Browse files Browse the repository at this point in the history
Closes UN-96
  • Loading branch information
tom-sherman committed Jul 3, 2024
1 parent 14fa80b commit b8661af
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/frontpage/lib/data/db/comment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,12 @@ export const getUserComments = cache(async (userDid: DID) => {
})
.from(schema.Comment)
.leftJoin(schema.Post, eq(schema.Comment.postId, schema.Post.id))
.where(eq(schema.Comment.authorDid, userDid));
.where(
and(
eq(schema.Comment.authorDid, userDid),
eq(schema.Comment.status, "live"),
),
);

return posts;
});

0 comments on commit b8661af

Please sign in to comment.