Skip to content
Snippets Groups Projects
Commit a66d3487 authored by Eugen Rochko's avatar Eugen Rochko
Browse files

Add more logging to PuSH callback

parent 608a2bff
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ class Api::SubscriptionsController < ApiController
def show
if @account.subscription(api_subscription_url(@account.id)).valid?(params['hub.topic'])
Rails.logger.debug "PuSH confirmation with lease_seconds: #{params['hub.lease_seconds']}"
@account.update(subscription_expires_at: Time.now + (params['hub.lease_seconds'].to_i).seconds)
render plain: HTMLEntities.new.encode(params['hub.challenge']), status: 200
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment