Merge remote-tracking branch 'parent/main' into upstream-20241009
This commit is contained in:
commit
d021659cb7
130 changed files with 1120 additions and 917 deletions
|
@ -160,13 +160,13 @@ class ActivityPub::ProcessAccountService < BaseService
|
|||
begin
|
||||
@account.avatar_remote_url = image_url('icon') || '' unless skip_download?
|
||||
@account.avatar = nil if @account.avatar_remote_url.blank?
|
||||
rescue Mastodon::UnexpectedResponseError, HTTP::TimeoutError, HTTP::ConnectionError, OpenSSL::SSL::SSLError
|
||||
rescue Mastodon::UnexpectedResponseError, *Mastodon::HTTP_CONNECTION_ERRORS
|
||||
RedownloadAvatarWorker.perform_in(rand(30..600).seconds, @account.id)
|
||||
end
|
||||
begin
|
||||
@account.header_remote_url = image_url('image') || '' unless skip_download?
|
||||
@account.header = nil if @account.header_remote_url.blank?
|
||||
rescue Mastodon::UnexpectedResponseError, HTTP::TimeoutError, HTTP::ConnectionError, OpenSSL::SSL::SSLError
|
||||
rescue Mastodon::UnexpectedResponseError, *Mastodon::HTTP_CONNECTION_ERRORS
|
||||
RedownloadHeaderWorker.perform_in(rand(30..600).seconds, @account.id)
|
||||
end
|
||||
@account.statuses_count = outbox_total_items if outbox_total_items.present?
|
||||
|
@ -406,7 +406,7 @@ class ActivityPub::ProcessAccountService < BaseService
|
|||
total_items = collection.is_a?(Hash) && collection['totalItems'].present? && collection['totalItems'].is_a?(Numeric) ? collection['totalItems'] : nil
|
||||
has_first_page = collection.is_a?(Hash) && collection['first'].present?
|
||||
@collections[type] = [total_items, has_first_page]
|
||||
rescue HTTP::Error, OpenSSL::SSL::SSLError, Mastodon::LengthValidationError
|
||||
rescue *Mastodon::HTTP_CONNECTION_ERRORS, Mastodon::LengthValidationError
|
||||
@collections[type] = [nil, nil]
|
||||
end
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ class ActivityPub::ProcessStatusUpdateService < BaseService
|
|||
media_attachment.download_file! if media_attachment.remote_url_previously_changed?
|
||||
media_attachment.download_thumbnail! if media_attachment.thumbnail_remote_url_previously_changed?
|
||||
media_attachment.save
|
||||
rescue Mastodon::UnexpectedResponseError, HTTP::TimeoutError, HTTP::ConnectionError, OpenSSL::SSL::SSLError
|
||||
rescue Mastodon::UnexpectedResponseError, *Mastodon::HTTP_CONNECTION_ERRORS
|
||||
RedownloadMediaWorker.perform_in(rand(30..600).seconds, media_attachment.id)
|
||||
rescue Seahorse::Client::NetworkingError => e
|
||||
Rails.logger.warn "Error storing media attachment: #{e}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue