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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

The language id is crucial for front ends. #2437

Merged
merged 1 commit into from Sep 13, 2022
Merged

The language id is crucial for front ends. #2437

merged 1 commit into from Sep 13, 2022

Conversation

dessalines
Copy link
Member

No description provided.

@Nutomic
Copy link
Member

Nutomic commented Sep 12, 2022

I dont think it is. You can use the code wherever you need to identify a specific language. This also has the advantage that its much easier to debug, as you can directly see which language it refers to. If use the id column, you would have to check the api every time. Plus language ids could be different between Lemmy instances.

@dessalines
Copy link
Member Author

language_ids don't need to be the same for every instance, but they will be, because they're all running the exact same migration (data in that table only comes from the migration).

The ids are necessary because SaveUserSettings has discussion_languages: Option<Vec<LanguageId>>

Its better to use the language_id directly, so the back end doesn't have to do any joins.

@Nutomic Nutomic enabled auto-merge (squash) September 13, 2022 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants