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

Conflicts:
- `app/models/concerns/domain_materializable.rb`:
  Fixed a code style issue upstream in a PR that got merged in glitch-soc
  earlier.
  Changed the code to match upstream's.
This commit is contained in:
Claire
2022-12-07 09:03:42 +01:00
22 changed files with 443 additions and 59 deletions

View File

@@ -59,7 +59,7 @@ class AccountMigration < ApplicationRecord
def set_target_account
self.target_account = ResolveAccountService.new.call(acct, skip_cache: true)
rescue Webfinger::Error, HTTP::Error, OpenSSL::SSL::SSLError, Mastodon::Error
rescue Webfinger::Error, HTTP::Error, OpenSSL::SSL::SSLError, Mastodon::Error, Addressable::URI::InvalidURIError
# Validation will take care of it
end

View File

@@ -14,7 +14,6 @@ module DomainMaterializable
Instance.refresh
count_unique_subdomains!
end
def count_unique_subdomains!

View File

@@ -54,7 +54,7 @@ class CustomFilter < ApplicationRecord
end
def irreversible=(value)
self.action = value ? :hide : :warn
self.action = ActiveModel::Type::Boolean.new.cast(value) ? :hide : :warn
end
def irreversible?

View File

@@ -32,7 +32,7 @@ class Form::Redirect
def set_target_account
@target_account = ResolveAccountService.new.call(acct, skip_cache: true)
rescue Webfinger::Error, HTTP::Error, OpenSSL::SSL::SSLError, Mastodon::Error
rescue Webfinger::Error, HTTP::Error, OpenSSL::SSL::SSLError, Mastodon::Error, Addressable::URI::InvalidURIError
# Validation will take care of it
end