mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-29 02:51:37 +01:00
Fix follow recommendation suppressions not applying immediately (#32392)
This commit is contained in:
parent
f99da81ef8
commit
192e9d16eb
1 changed files with 2 additions and 1 deletions
|
@ -18,5 +18,6 @@ class FollowRecommendation < ApplicationRecord
|
||||||
belongs_to :account_summary, foreign_key: :account_id, inverse_of: false
|
belongs_to :account_summary, foreign_key: :account_id, inverse_of: false
|
||||||
belongs_to :account
|
belongs_to :account
|
||||||
|
|
||||||
scope :localized, ->(locale) { joins(:account_summary).merge(AccountSummary.localized(locale)) }
|
scope :unsupressed, -> { where.not(FollowRecommendationSuppression.where(FollowRecommendationSuppression.arel_table[:account_id].eq(arel_table[:account_id])).select(1).arel.exists) }
|
||||||
|
scope :localized, ->(locale) { unsupressed.joins(:account_summary).merge(AccountSummary.localized(locale)) }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue