diff --git a/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush/index.tsx b/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush/index.tsx index 56fe7afd7..51d7d3ec4 100644 --- a/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush/index.tsx +++ b/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush/index.tsx @@ -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');