Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
liberty
host
Smilodon
Commits
50638174
Commit
50638174
authored
Nov 28, 2016
by
Eugen Rochko
Browse files
More logging to ConfirmationWorker
parent
4eba7671
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/workers/pubsubhubbub/confirmation_worker.rb
View file @
50638174
...
...
@@ -20,9 +20,13 @@ class Pubsubhubbub::ConfirmationWorker
'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!
elsif
(
mode
==
'unsubscribe'
&&
response
.
body
.
to_s
==
challenge
)
||
!
subscription
.
confirmed?
elsif
(
mode
==
'unsubscribe'
&&
body
==
challenge
)
||
!
subscription
.
confirmed?
subscription
.
destroy!
end
end
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment