Add more logging to PuSH callback
parent
608a2bfffc
commit
a66d34878c
|
@ -4,6 +4,7 @@ class Api::SubscriptionsController < ApiController
|
||||||
|
|
||||||
def show
|
def show
|
||||||
if @account.subscription(api_subscription_url(@account.id)).valid?(params['hub.topic'])
|
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)
|
@account.update(subscription_expires_at: Time.now + (params['hub.lease_seconds'].to_i).seconds)
|
||||||
render plain: HTMLEntities.new.encode(params['hub.challenge']), status: 200
|
render plain: HTMLEntities.new.encode(params['hub.challenge']), status: 200
|
||||||
else
|
else
|
||||||
|
|
Reference in New Issue