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

@ -236,6 +236,25 @@ module Mastodon
say('OK', :green)
end
desc 'fix-duplicates', 'Find duplicate remote accounts and merge them'
option :dry_run, type: :boolean
long_desc <<-LONG_DESC
Merge known remote accounts sharing an ActivityPub actor identifier.
Such duplicates can occur when a remote server admin misconfigures their
domain configuration.
LONG_DESC
def fix_duplicates
Account.remote.select(:uri, 'count(*)').group(:uri).having('count(*) > 1').pluck_each(:uri) do |uri|
say("Duplicates found for #{uri}")
begin
ActivityPub::FetchRemotAccountService.new.call(uri) unless options[:dry_run]
rescue => e
say("Error processing #{uri}: #{e}", :red)
end
end
end
desc 'backup USERNAME', 'Request a backup for a user'
long_desc <<-LONG_DESC
Request a new backup for an account with a given USERNAME.

View File

@ -14,7 +14,7 @@ module Mastodon
end
MIN_SUPPORTED_VERSION = 2019_10_01_213028
MAX_SUPPORTED_VERSION = 2020_12_06_004238
MAX_SUPPORTED_VERSION = 2020_12_18_054746
# Stubs to enjoy ActiveRecord queries while not depending on a particular
# version of the code/database

View File

@ -17,7 +17,7 @@ module Mastodon
end
def flags
'rc1'
'rc2'
end
def suffix