Fix #329 - avatar errors no longer prevent remote accounts from being saved
(without avatar). Also improved search position of exact matches
This commit is contained in:
@ -11,18 +11,9 @@ namespace :mastodon do
|
||||
namespace :push do
|
||||
desc 'Unsubscribes from PuSH updates of feeds nobody follows locally'
|
||||
task clear: :environment do
|
||||
include RoutingHelper
|
||||
|
||||
Account.remote.without_followers.where.not(subscription_expires_at: nil).find_each do |a|
|
||||
Rails.logger.debug "PuSH unsubscribing from #{a.acct}"
|
||||
|
||||
begin
|
||||
a.subscription(api_subscription_url(a.id)).unsubscribe
|
||||
rescue HTTP::Error, OpenSSL::SSL::SSLError
|
||||
Rails.logger.debug "PuSH unsubscribing from #{a.acct} failed due to an HTTP or SSL error"
|
||||
ensure
|
||||
a.update!(secret: '', subscription_expires_at: nil)
|
||||
end
|
||||
UnsubscribeService.new.call(a)
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user