Skip to content

Commit

Permalink
fix(feed): use correct column name and select children from current n…
Browse files Browse the repository at this point in the history
…etwork only (#1271)

Signed-off-by: Norman Meier <norman@samourai.coop>
  • Loading branch information
n0izn0iz committed Sep 11, 2024
1 parent f4267e2 commit a9721bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions go/pkg/feed/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ func (s *FeedService) Posts(ctx context.Context, req *feedpb.PostsRequest) (*fee
Select(`
p1.*,
(
SELECT COUNT(p2.identifier) AS sub_post_length
SELECT COUNT(p2.local_identifier) AS sub_post_length
FROM posts p2
WHERE p2.parent_post_identifier = p1.identifier
WHERE p2.parent_post_identifier = p1.local_identifier AND p2.network_id = p1.network_id
)
`)

Expand Down

0 comments on commit a9721bf

Please sign in to comment.