0
0
Fork 0

Fix localization of cold-start follow recommendations (#17479)

This commit is contained in:
Eugen Rochko 2022-02-08 01:53:49 +01:00 committed by GitHub
parent 52c1b86964
commit 35850f8195
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 14 deletions

View file

@ -6,7 +6,7 @@ class AccountSuggestions::GlobalSource < AccountSuggestions::Source
end
def get(account, skip_account_ids: [], limit: 40)
account_ids = account_ids_for_locale(account.user_locale) - [account.id] - skip_account_ids
account_ids = account_ids_for_locale(I18n.locale.to_str.split(/[_-]/).first) - [account.id] - skip_account_ids
as_ordered_suggestions(
scope(account).where(id: account_ids),