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

@ -1,15 +1,12 @@
class SubscribeService < BaseService
def call(account)
account.secret = SecureRandom.hex
account.verify_token = SecureRandom.hex
account.secret = SecureRandom.hex
subscription = account.subscription(api_subscription_url(account.id))
response = subscription.subscribe
unless response.successful?
account.secret = ''
account.verify_token = ''
account.secret = ''
Rails.logger.debug "PuSH subscription request for #{account.acct} failed: #{response.message}"
end