Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: API /comment/list with max_depth ignores limit #4421

Closed
4 tasks done
Demigodrick opened this issue Feb 2, 2024 · 1 comment
Closed
4 tasks done

[Bug]: API /comment/list with max_depth ignores limit #4421

Demigodrick opened this issue Feb 2, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Demigodrick
Copy link

Requirements

  • Is this a bug report? For questions or discussions use https://lemmy.ml/c/lemmy_support
  • Did you check to see if this issue already exists?
  • Is this only a single bug? Do not put multiple bugs in one issue.
  • Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.

Summary

The API endpoint /comment/list has a modifier for limit so you can limit how many comments it returns.

When setting max_depth to any value (i.e 1) the API returns 300 comments, ignoring the limit.

Steps to Reproduce

  1. Call /comment/list with max depth set to a value

Technical Details

Output from running code:

2024-02-02 10:20:18,122 - INFO - Requesting API Request.GET /comment/list
Requesting 20 latest comments without max depth: 20
2024-02-02 10:20:18,306 - INFO - Requesting API Request.GET /comment/list
Requesting 20 latest comments with max depth set to 1: 300

Version

0.19.3

Lemmy Instance URL

lemmy.zip

@Demigodrick Demigodrick added the bug Something isn't working label Feb 2, 2024
@Nutomic
Copy link
Member

Nutomic commented Feb 7, 2024

Duplicate of #3065

@Nutomic Nutomic marked this as a duplicate of #3065 Feb 7, 2024
@Nutomic Nutomic closed this as completed Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants