mirror of
https://github.com/mastodon/mastodon.git
synced 2025-07-12 15:33:14 +00:00
Compare commits
2 Commits
bfb54fb929
...
cf06ea7200
Author | SHA1 | Date | |
---|---|---|---|
![]() |
cf06ea7200 | ||
![]() |
69c051bc92 |
|
@ -19,7 +19,7 @@ class AccountSuggestions::Source
|
|||
.where.not(follow_requests_sql, id: account.id)
|
||||
.not_excluded_by_account(account)
|
||||
.not_domain_blocked_by_account(account)
|
||||
.where.not(id: account.id)
|
||||
.excluding(account)
|
||||
.where.not(follow_recommendation_mutes_sql, id: account.id)
|
||||
end
|
||||
|
||||
|
|
|
@ -198,7 +198,7 @@ class ActivityPub::ProcessAccountService < BaseService
|
|||
end
|
||||
|
||||
def process_duplicate_accounts!
|
||||
return unless Account.where(uri: @account.uri).where.not(id: @account.id).exists?
|
||||
return unless Account.where(uri: @account.uri).excluding(@account).exists?
|
||||
|
||||
AccountMergingWorker.perform_async(@account.id)
|
||||
end
|
||||
|
|
|
@ -7,7 +7,7 @@ class UniqueUsernameValidator < ActiveModel::Validator
|
|||
return if account.username.blank?
|
||||
|
||||
scope = Account.with_username(account.username).with_domain(account.domain)
|
||||
scope = scope.where.not(id: account.id) if account.persisted?
|
||||
scope = scope.excluding(account) if account.persisted?
|
||||
|
||||
account.errors.add(:username, :taken) if scope.exists?
|
||||
end
|
||||
|
|
|
@ -10,7 +10,7 @@ class AccountMergingWorker
|
|||
|
||||
return true if account.nil? || account.local?
|
||||
|
||||
Account.where(uri: account.uri).where.not(id: account.id).find_each do |duplicate|
|
||||
Account.where(uri: account.uri).excluding(account).find_each do |duplicate|
|
||||
account.merge_with!(duplicate)
|
||||
duplicate.destroy
|
||||
end
|
||||
|
|
|
@ -22,7 +22,7 @@ class BackupWorker
|
|||
|
||||
BackupService.new.call(backup)
|
||||
|
||||
user.backups.where.not(id: backup.id).destroy_all
|
||||
user.backups.excluding(backup).destroy_all
|
||||
UserMailer.backup_ready(user, backup).deliver_later
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user