update custom keys to not be included in alert property

This commit is contained in:
2025-04-22 11:10:00 -07:00
parent ba0375f582
commit 1cb498b150

View File

@@ -107,15 +107,21 @@ export class AppleNotificationSender {
resolve(); resolve();
}); });
const customKeys = {
...notificationAlertArguments.customKeys,
}
delete notificationAlertArguments.customKeys;
// See https://developer.apple.com/documentation/usernotifications/generating-a-remote-notification // See https://developer.apple.com/documentation/usernotifications/generating-a-remote-notification
// for notification payload examples // for notification payload examples
req.write(JSON.stringify({ const payload = JSON.stringify({
aps: { aps: {
alert: notificationAlertArguments, alert: notificationAlertArguments,
sound: "default" sound: "default"
}, },
...notificationAlertArguments.customKeys, customKeys,
})); });
req.write(payload);
req.end(); req.end();
}); });
return true; return true;