fix(webpush): delete push subscriptions for multiple devices

Signed-off-by: 0xsysr3ll <0xsysr3ll@pm.me>
This commit is contained in:
0xsysr3ll
2025-12-07 20:28:12 +01:00
parent 88de23d455
commit 2b4e5a1f01

View File

@@ -119,6 +119,14 @@ const UserWebPushSettings = () => {
if (endpointToDelete) {
await deletePushSubscriptionFromBackend(endpointToDelete);
} else if (dataDevices && dataDevices.length > 0) {
for (const device of dataDevices) {
try {
await deletePushSubscriptionFromBackend(device.endpoint);
} catch (error) {
// Continue deleting other subscriptions even if one fails
}
}
}
localStorage.setItem('pushNotificationsEnabled', 'false');