mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2025-12-23 18:29:19 -05:00
fix(webpush): delete push subscriptions for multiple devices
Signed-off-by: 0xsysr3ll <0xsysr3ll@pm.me>
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user