0
0
Fork 0

Fix follow suggestions potentially including silenced or blocked accounts (#29306)

This commit is contained in:
Claire 2024-03-04 07:35:20 +01:00 committed by GitHub
parent 68600893d2
commit ee8d0b9447
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 107 additions and 34 deletions

View file

@ -12,6 +12,8 @@ class AccountSuggestions::Source
def base_account_scope(account)
Account
.searchable
.where(discoverable: true)
.without_silenced
.where.not(follows_sql, id: account.id)
.where.not(follow_requests_sql, id: account.id)
.not_excluded_by_account(account)