Merge commit '53c183f899b5382f1eebd72e34a090c30f8eba6a' into glitch-soc/merge-upstream

This commit is contained in:
Claire committed 2024-08-19 18:25:31 +02:00
commit 1760f84349
54 files changed
+1054 -447

No files matched your search

+1
View File
@@ -144,6 +144,7 @@ class Account < ApplicationRecord
scope :dormant, -> { joins(:account_stat).merge(AccountStat.without_recent_activity) }
scope :with_username, ->(value) { where arel_table[:username].lower.eq(value.to_s.downcase) }
scope :with_domain, ->(value) { where arel_table[:domain].lower.eq(value&.to_s&.downcase) }
scope :without_memorial, -> { where(memorial: false) }
after_update_commit :trigger_update_webhooks
@@ -31,6 +31,7 @@ class AccountSuggestions::FriendsOfFriendsSource < AccountSuggestions::Source
AND accounts.suspended_at IS NULL
AND accounts.silenced_at IS NULL
AND accounts.moved_to_account_id IS NULL
AND accounts.memorial = FALSE
AND follow_recommendation_mutes.target_account_id IS NULL
GROUP BY accounts.id, account_stats.id
ORDER BY frequency DESC, account_stats.followers_count ASC
+1
View File
@@ -14,6 +14,7 @@ class AccountSuggestions::Source
.searchable
.where(discoverable: true)
.without_silenced
.without_memorial
.where.not(follows_sql, id: account.id)
.where.not(follow_requests_sql, id: account.id)
.not_excluded_by_account(account)
+1 -1
View File
@@ -14,7 +14,7 @@ class Trends::TagFilter
def results
scope = if params[:status] == 'pending_review'
Tag.unscoped
Tag.unscoped.order(id: :desc)
else
trending_scope
end