Merge remote-tracking branch 'parent/main' into upstream-20240319
This commit is contained in:
commit
76598bd542
496 changed files with 5795 additions and 3709 deletions
|
@ -267,10 +267,6 @@ module Account::Interactions
|
|||
status_pins.exists?(status: status)
|
||||
end
|
||||
|
||||
def endorsed?(account)
|
||||
account_pins.exists?(target_account: account)
|
||||
end
|
||||
|
||||
def status_matches_filters(status)
|
||||
active_filters = CustomFilter.cached_filters_for(id)
|
||||
CustomFilter.apply_cached_filters(active_filters, status, following: following?(status.account))
|
||||
|
|
|
@ -31,7 +31,7 @@ module Account::StatusesSearch
|
|||
def add_to_public_statuses_index!
|
||||
return unless Chewy.enabled?
|
||||
|
||||
statuses.without_reblogs.where(visibility: :public).reorder(nil).find_in_batches do |batch|
|
||||
statuses.without_reblogs.public_visibility.reorder(nil).find_in_batches do |batch|
|
||||
PublicStatusesIndex.import(batch)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,6 +5,18 @@ module DomainNormalizable
|
|||
|
||||
included do
|
||||
before_validation :normalize_domain
|
||||
|
||||
scope :by_domain_length, -> { order(domain_char_length.desc) }
|
||||
end
|
||||
|
||||
class_methods do
|
||||
def domain_char_length
|
||||
Arel.sql(
|
||||
<<~SQL.squish
|
||||
CHAR_LENGTH(domain)
|
||||
SQL
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue