mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-12-26 07:06:48 +00:00
Properly delete remote account's avatar/header when fetch/update (#18973)
This commit is contained in:
parent
113dd90aa3
commit
6aa83b13ba
|
@ -105,11 +105,13 @@ class ActivityPub::ProcessAccountService < BaseService
|
|||
def set_fetchable_attributes!
|
||||
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
|
||||
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
|
||||
RedownloadHeaderWorker.perform_in(rand(30..600).seconds, @account.id)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue