1
0
mirror of https://github.com/whippyshou/mastodon synced 2024-11-24 15:16:26 +09:00

More debugging for PuSH confirmations

This commit is contained in:
Eugen Rochko 2016-09-20 03:18:55 +02:00
parent a66d34878c
commit 246330493b

View File

@ -4,7 +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']}"
Rails.logger.debug "PuSH confirmation: #{params.inspect}"
@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