about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-10-10 03:40:08 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-10-10 03:40:08 +0200
commit65ae9637d6cc7a9d351e8f83993ef138a01b1485 (patch)
tree867b6f1571355fe3d890a15446f73980dab1f4e4 /lib
parentaec51e40ee98b1a73d59b1456e61709d49c61552 (diff)
PuSH unsubscribe needs correct callback URL
Diffstat (limited to 'lib')
-rw-r--r--lib/tasks/mastodon.rake4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake
index 872b33cdd..29e4494c4 100644
--- a/lib/tasks/mastodon.rake
+++ b/lib/tasks/mastodon.rake
@@ -11,11 +11,13 @@ 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.find_each do |a|
         Rails.logger.debug "PuSH unsubscribing from #{a.acct}"
 
         begin
-          a.subscription('').unsubscribe
+          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