0
0
Fork 0

Merge upstream

This commit is contained in:
オスカー、 2024-10-09 19:04:59 +09:00
commit 8839cdd4d0
No known key found for this signature in database
GPG key ID: 139D6573F92DA9F7
160 changed files with 1705 additions and 1555 deletions

View file

@ -36,4 +36,11 @@ module Mastodon
super()
end
end
HTTP_CONNECTION_ERRORS = [
HTTP::ConnectionError,
HTTP::Error,
HTTP::TimeoutError,
OpenSSL::SSL::SSLError,
].freeze
end

View file

@ -305,7 +305,7 @@ module Mastodon::CLI
begin
code = Request.new(:head, account.uri).perform(&:code)
rescue HTTP::TimeoutError, HTTP::ConnectionError, OpenSSL::SSL::SSLError, Mastodon::PrivateNetworkAddressError
rescue *Mastodon::HTTP_CONNECTION_ERRORS, Mastodon::PrivateNetworkAddressError
skip_domains << account.domain
end

View file

@ -5,7 +5,7 @@ require_relative 'base'
module Mastodon::CLI
class IpBlocks < Base
option :severity, required: true, enum: %w(no_access sign_up_requires_approval sign_up_block), desc: 'Severity of the block'
option :severity, required: true, enum: IpBlock.severities.keys, desc: 'Severity of the block'
option :comment, aliases: [:c], desc: 'Optional comment'
option :duration, aliases: [:d], type: :numeric, desc: 'Duration of the block in seconds'
option :force, type: :boolean, aliases: [:f], desc: 'Overwrite existing blocks'