Merge branch 'master' into glitch-soc/merge-upstream

Conflicts:
- `app/services/resolve_url_service.rb`:
  The private toot search by URL hack has been revamped upstream.
  Took upstream's version.
This commit is contained in:
Claire
2020-12-19 00:55:12 +01:00
212 changed files with 5850 additions and 1383 deletions

View File

@@ -0,0 +1,18 @@
# frozen_string_literal: true
class AccountMergingWorker
include Sidekiq::Worker
sidekiq_options queue: 'pull'
def perform(account_id)
account = Account.find(account_id)
return true if account.nil? || account.local?
Account.where(uri: account.uri).where.not(id: account.id).find_each do |duplicate|
account.merge_with!(duplicate)
duplicate.destroy
end
end
end