▲ 8 ▼ Why the API says a post doesn't have comments when the HTML page shows comments ? (jlai.lu) submitted 1 year ago by KaKi87@jlai.lu to c/lemmy_support@lemmy.ml 6 comments fedilink hide all child comments Hi, This post has comments : https://jlai.lu/post/26123233 But when asking the API : https://jlai.lu/api/v3/comment/list?post_id=26123233&sort=Old An empty array is returned. Why ? Thanks
[+] NJSpradlin@lemmy.world 1 point 11 months ago (1 child) [deleted] permalink fedilink source hideshow 1 child comment replies: [–] KaKi87@jlai.lu [S] 2 points 11 months ago It might be, yes : https://github.com/aeharding/voyager/blob/main/src/routes/pages/shared/CommentsPage.tsx#L41 As mentioned by @cypherpunks@lemmy.ml, the solution is to add type_=All in query parameters. From the Voyager app's source code, it seems like the value is undefined by default. I think replacing this by All could fix the issue. But, I have no experience in that app's dev stack, so I can't be sure. Therefore, I'd suggest submitting a GitHub issue showing 2 screenshots : of the same post, one on Voyager, the other one on another app, where the former shows less comments than the latter. Indicate that replacing undefined with All might fix the issue. If the maintainer(s) reproduce and confirm, they'll push the fix. If I was more confident, I'd directly make a PR, but I'm not. permalink fedilink source parent
[–] KaKi87@jlai.lu [S] 2 points 11 months ago It might be, yes : https://github.com/aeharding/voyager/blob/main/src/routes/pages/shared/CommentsPage.tsx#L41 As mentioned by @cypherpunks@lemmy.ml, the solution is to add type_=All in query parameters. From the Voyager app's source code, it seems like the value is undefined by default. I think replacing this by All could fix the issue. But, I have no experience in that app's dev stack, so I can't be sure. Therefore, I'd suggest submitting a GitHub issue showing 2 screenshots : of the same post, one on Voyager, the other one on another app, where the former shows less comments than the latter. Indicate that replacing undefined with All might fix the issue. If the maintainer(s) reproduce and confirm, they'll push the fix. If I was more confident, I'd directly make a PR, but I'm not. permalink fedilink source parent