0
0
Fork 0

Upgrade to PubSubHubbub 0.4 (removing verify_token)

This commit is contained in:
Eugen Rochko 2016-09-20 02:43:20 +02:00
parent a86f21cf90
commit 608a2bfffc
9 changed files with 19 additions and 19 deletions

View file

@ -13,12 +13,13 @@ namespace :mastodon do
task clear: :environment do
Account.remote.without_followers.find_each do |a|
Rails.logger.debug "PuSH unsubscribing from #{a.acct}"
begin
a.subscription('').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!(verify_token: '', secret: '', subscription_expires_at: nil)
a.update!(secret: '', subscription_expires_at: nil)
end
end
end