`limit` isnt respected when `max_depth` is used on comments endpoint
- [x] Did you check to see if this issue already exists?
- [x] Is this only a single bug? Do not put multiple bugs in one issue.
- [x] Is this a question or discussion? Don't use this, use https://lemmy.ml/c/lemmy_support .
- [x] Is this a UI / front end issue? Use the lemmy-ui repo.
Issue Summary
The getComments endpoint doesn't seem to respect the limit when used with max_depth
Steps to Reproduce
- Navigate to https://feddit.de/api/v3/comment/list?post_id=745959&type_=All&max_depth=4&limit=1 or curl or whatever
- Notice that it returns way more comments than just the 1 I've set in the
limitparam
Technical details
- Please post your log:
sudo docker-compose logs > lemmy_log.out. - What OS are you trying to install lemmy on?
- Any browser console errors?
For now this is intended, not sure what the long term resolution is:
https://github.com/LemmyNet/lemmy/blob/5af831c6fad0cd462f6abe3645d8c26b3481bab7/crates/db_views/src/comment_view.rs#L335-L342
Closing in favor of https://github.com/LemmyNet/lemmy/issues/4543
Thanks for working on this. I took a look at #4543 issue and doesnt seem related. Was closing this issue and marking it completed a mistake? 🤔
I believe its part of the same problem which is described in this comment. cc @dessalines
Yes that's correct, the new issue is used to track this now.