Merge branch 'main' into glitch-soc/merge-upstream

This commit is contained in:
Claire
2022-02-08 18:23:53 +01:00
26 changed files with 628 additions and 594 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),

View File

@@ -245,6 +245,10 @@ class User < ApplicationRecord
save!
end
def preferred_posting_language
settings.default_language || locale
end
def setting_default_privacy
settings.default_privacy || (account.locked? ? 'private' : 'public')
end