diff --git a/convex/posts.ts b/convex/posts.ts index f4b45ac..2b04cb7 100644 --- a/convex/posts.ts +++ b/convex/posts.ts @@ -154,6 +154,7 @@ export const getUserPostCount = query({ const posts = await ctx.db .query('posts') .withIndex('by_user_id', q => q.eq('userId', args.userId)) + .filter(q => q.eq(q.field('parentPostId'), undefined)) .collect(); return posts.length;