From 227fb5ac844997dd7aa6058bc815a7428e72485d Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Tue, 19 May 2015 12:33:53 -0700 Subject: [PATCH] support subscribing with either "topic" or "url" param --- controllers/push.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/controllers/push.php b/controllers/push.php index e743a20..207ec66 100644 --- a/controllers/push.php +++ b/controllers/push.php @@ -52,7 +52,11 @@ $app->post('/', function() use($app) { case 'unsubscribe': // Sanity check the request params - $topic = push_param($params, 'topic'); + $topic = push_param($params, 'url'); + // Support subscribing using either "url" or "topic" parameters + if(!$topic) { + $topic = push_param($params, 'topic'); + } $callback = push_param($params, 'callback'); if(!$topic) {