From 8972d2d72adf4e7266a5f4b1e09197138540d239 Mon Sep 17 00:00:00 2001 From: Timon Ostertun Date: Wed, 19 Feb 2025 16:49:51 +0100 Subject: [PATCH] gitflow-hotfix-stash: debug_info_on_push_subscription --- client/scripts/regatten.js.php | 8 ++++---- server/version.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/scripts/regatten.js.php b/client/scripts/regatten.js.php index 83bb367..29eff39 100644 --- a/client/scripts/regatten.js.php +++ b/client/scripts/regatten.js.php @@ -320,7 +320,7 @@ function pushesSubscribe() { applicationServerKey: applicationServerKey }) .then(async function(subscription) { - log('[app] Subscription:', subscription); + log('[app] Subscription:', JSON.stringify(subscription)); if (await pushesUpdateServerSubscription(subscription, true)) { log('[app] Subscription: Sent to server, updating UI'); dbSettingsSet('notify_endpoint_' + BOATCLASS, subscription.endpoint); @@ -346,7 +346,7 @@ function pushesUnSubscribe(silent = false) { log('[app] Unsubscribing'); swRegistration.pushManager.getSubscription() .then(async function(subscription) { - log('[app] Subscription:', subscription); + log('[app] Subscription:', JSON.stringify(subscription)); if (subscription) { if (await pushesUpdateServerSubscription(subscription, false)) { log('[app] Subscription: Removed from server'); @@ -374,7 +374,7 @@ function pushesUnSubscribe(silent = false) { function pushesUpdateServerSubscription(subscription, enabled) { return new Promise(function(resolve){ - log('[app] updateServer', enabled, subscription); + log('[app] updateServer', enabled, JSON.stringify(subscription)); $.ajax({ url: QUERY_URL + (enabled ? 'add' : 'remove') + '_subscription', type: 'POST', @@ -477,7 +477,7 @@ function updatePushBadge() { var dbSub = await dbSettingsGet('notify_endpoint_' + BOATCLASS); var isSub = (subscription !== null); log('[app] DB Subscription:', dbSub); - log('[app] Real Subscription:', subscription); + log('[app] Real Subscription:', JSON.stringify(subscription)); if (isSub) { $('#badge-pushes').removeClass('bg-red2-dark').addClass('bg-green2-dark').text('AN'); if (dbSub === null) dbSettingsSet('notify_endpoint_' + BOATCLASS, subscription.endpoint); diff --git a/server/version.php b/server/version.php index 75ece17..94db789 100644 --- a/server/version.php +++ b/server/version.php @@ -1,5 +1,5 @@