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

Include creator_mod bool in PostView and CommentView #3347

Closed
4 tasks done
EricBAndrews opened this issue Jun 26, 2023 · 2 comments
Closed
4 tasks done

Include creator_mod bool in PostView and CommentView #3347

EricBAndrews opened this issue Jun 26, 2023 · 2 comments
Labels
area: api enhancement New feature or request

Comments

@EricBAndrews
Copy link

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.

Is your proposal related to a problem?

I'm one of the devs on Mlem, an iOS reader for Lemmy. We want to flair moderators in the main feed, but to do so with the current API would require us to make additional calls for every post to fetch community context and parse the mod list. Including this information in the original PostView response would let us reduce the load our app puts on instances.

Describe the solution you'd like.

Include a boolean creator_mod field in PostView and CommentView to indicate whether the creator is a moderator of the community the post or comment was made in.

Describe alternatives you've considered.

Making an additional call for every post to get the community information and parsing the mod status from there. We discarded this because of the load it would add to instances.

Additional context

No response

@EricBAndrews EricBAndrews added the enhancement New feature or request label Jun 26, 2023
@PawanHegde
Copy link
Contributor

Have you considered lazily caching the list of mods app-side for each community you encounter?

@PennyJim
Copy link

PennyJim commented Jul 9, 2023

I think #3066 would be the good way to do this; to allow moderators or admins to speak as such only when they need to.

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
Projects
None yet
Development

No branches or pull requests

4 participants