From a66d34878c7353064e6d85f79485e5a52bb2d7c1 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 20 Sep 2016 03:12:23 +0200 Subject: [PATCH] Add more logging to PuSH callback --- app/controllers/api/subscriptions_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/api/subscriptions_controller.rb b/app/controllers/api/subscriptions_controller.rb index 04d99b828..68cdef8cc 100644 --- a/app/controllers/api/subscriptions_controller.rb +++ b/app/controllers/api/subscriptions_controller.rb @@ -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