Browse Source

Add more logging to PuSH callback

closed-social-glitch-2
Eugen Rochko 8 years ago
parent
commit
a66d34878c
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      app/controllers/api/subscriptions_controller.rb

+ 1
- 0
app/controllers/api/subscriptions_controller.rb View File

@ -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

Loading…
Cancel
Save