Merge commit '954b470fbce3fbe4b9b42992b03425fa24d6a2ad' into glitch-soc/merge-upstream

Conflicts:
- `config/navigation.rb`:
  Upstream added a navigation item while glitch-soc had an additional one.
  Ported upstream changes.
This commit is contained in:
Claire committed 2024-04-06 19:35:21 +02:00
commit f2b23aa5f3
40 files changed
+870 -174

No files matched your search

+16 -1
View File
@@ -5,7 +5,7 @@ require_relative 'base'
module Mastodon::CLI
class Maintenance < Base
MIN_SUPPORTED_VERSION = 2019_10_01_213028
MAX_SUPPORTED_VERSION = 2023_09_07_150100
MAX_SUPPORTED_VERSION = 2023_10_23_105620
# Stubs to enjoy ActiveRecord queries while not depending on a particular
# version of the code/database
@@ -39,6 +39,7 @@ module Mastodon::CLI
class Webhook < ApplicationRecord; end
class BulkImport < ApplicationRecord; end
class SoftwareUpdate < ApplicationRecord; end
class SeveredRelationship < ApplicationRecord; end
class DomainBlock < ApplicationRecord
enum severity: { silence: 0, suspend: 1, noop: 2 }
@@ -129,6 +130,20 @@ module Mastodon::CLI
record.update_attribute(:account_warning_id, id)
end
end
if ActiveRecord::Base.connection.table_exists?(:severed_relationships)
SeveredRelationship.where(local_account_id: other_account.id).reorder(nil).find_each do |record|
record.update_attribute(:local_account_id, id)
rescue ActiveRecord::RecordNotUnique
next
end
SeveredRelationship.where(remote_account_id: other_account.id).reorder(nil).find_each do |record|
record.update_attribute(:remote_account_id, id)
rescue ActiveRecord::RecordNotUnique
next
end
end
end
end