mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-02-28 16:33:03 +01:00
Don't check push subscription when not logged in
This commit is contained in:
parent
3033ad4400
commit
e6ad24980e
1 changed files with 3 additions and 0 deletions
|
@ -14,6 +14,9 @@ export function unsubscribeHandler(): void {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function checkSubscription(subscription: PushSubscription): 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', {
|
post('/ajax/webpush/check', {
|
||||||
body: {
|
body: {
|
||||||
endpoint: subscription.endpoint
|
endpoint: subscription.endpoint
|
||||||
|
|
Loading…
Reference in a new issue