Don't check push subscription when not logged in

This commit is contained in:
Karina Kwiatek 2023-01-04 12:31:47 +01:00 committed by Andreas Nedbal
parent e48ec8565a
commit 9fd3940b7d

View file

@ -14,6 +14,9 @@ export function unsubscribeHandler(): void {
}
export function checkSubscription(subscription: PushSubscription): void {
// We can have a subscription active for any user while not logged in.
if (document.body.classList.contains('not-logged-in')) return;
post('/ajax/webpush/check', {
body: {
endpoint: subscription.endpoint