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

Return a list of posts when creating a post #4776

Open
5 tasks done
dullbananas opened this issue Jun 4, 2024 · 2 comments
Open
5 tasks done

Return a list of posts when creating a post #4776

dullbananas opened this issue Jun 4, 2024 · 2 comments
Labels
area: api enhancement New feature or request extra: good first issue Good for newcomers

Comments

@dullbananas
Copy link
Collaborator

Requirements

  • Is this a feature request? 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 feature request? Do not put multiple feature requests in one issue.
  • Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.
  • Do you agree to follow the rules in our Code of Conduct?

Is your proposal related to a problem?

Currently, after creating a post, only the created post is shown. Showing a list of the community's newest posts instead, with the new post at the top, would lead to a higher and more consistent amount of people who see new posts.

Describe the solution you'd like.

Add a variant of the post creation API that returns this list of posts.

Describe alternatives you've considered.

An alternative is to add a page_after_or_equal option to the post list API. This would make two sequential requests necessary, which significantly affects speed, and the time between the two requests could increase cache misses in the database if a lot of other queries happen in that time.

Additional context

No response

@dullbananas dullbananas added enhancement New feature or request extra: good first issue Good for newcomers area: api labels Jun 4, 2024
@MV-GH
Copy link
Contributor

MV-GH commented Jun 4, 2024

Could this not be achieved in the frontend by just redirecting to community feed sorted by new?

@dullbananas
Copy link
Collaborator Author

@MV-GH That solution would sometimes confuse the user because it would not guarantee that the new post is the first item, especially if new posts are frequent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: api enhancement New feature or request extra: good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants