mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-24 18:13:42 +01:00
More logging to ConfirmationWorker
This commit is contained in:
parent
4eba76711b
commit
50638174c8
1 changed files with 6 additions and 2 deletions
|
@ -20,9 +20,13 @@ class Pubsubhubbub::ConfirmationWorker
|
||||||
'hub.lease_seconds' => subscription.lease_seconds,
|
'hub.lease_seconds' => subscription.lease_seconds,
|
||||||
})
|
})
|
||||||
|
|
||||||
if mode == 'subscribe' && response.body.to_s == challenge
|
body = response.body.to_s
|
||||||
|
|
||||||
|
Rails.logger.debug "Confirming PuSH subscription for #{subscription.callback_url} with challenge #{challenge}: #{body}"
|
||||||
|
|
||||||
|
if mode == 'subscribe' && body == challenge
|
||||||
subscription.save!
|
subscription.save!
|
||||||
elsif (mode == 'unsubscribe' && response.body.to_s == challenge) || !subscription.confirmed?
|
elsif (mode == 'unsubscribe' && body == challenge) || !subscription.confirmed?
|
||||||
subscription.destroy!
|
subscription.destroy!
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue