2021-04-24 08:01:43 -07:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class AccountSuggestions::Source
|
|
|
|
def get(_account, **kwargs)
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
|
|
|
protected
|
|
|
|
|
2023-12-19 02:59:43 -08:00
|
|
|
def base_account_scope(account)
|
|
|
|
Account.searchable
|
|
|
|
.followable_by(account)
|
|
|
|
.not_excluded_by_account(account)
|
|
|
|
.not_domain_blocked_by_account(account)
|
|
|
|
.where.not(id: account.id)
|
|
|
|
.joins("LEFT OUTER JOIN follow_recommendation_mutes ON follow_recommendation_mutes.target_account_id = accounts.id AND follow_recommendation_mutes.account_id = #{account.id}").where(follow_recommendation_mutes: { target_account_id: nil })
|
2021-04-24 08:01:43 -07:00
|
|
|
end
|
|
|
|
end
|