mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 16:00:32 +00:00
update custom keys to not be included in alert property
This commit is contained in:
@@ -107,15 +107,21 @@ export class AppleNotificationSender {
|
||||
resolve();
|
||||
});
|
||||
|
||||
const customKeys = {
|
||||
...notificationAlertArguments.customKeys,
|
||||
}
|
||||
delete notificationAlertArguments.customKeys;
|
||||
|
||||
// See https://developer.apple.com/documentation/usernotifications/generating-a-remote-notification
|
||||
// for notification payload examples
|
||||
req.write(JSON.stringify({
|
||||
const payload = JSON.stringify({
|
||||
aps: {
|
||||
alert: notificationAlertArguments,
|
||||
sound: "default"
|
||||
},
|
||||
...notificationAlertArguments.customKeys,
|
||||
}));
|
||||
customKeys,
|
||||
});
|
||||
req.write(payload);
|
||||
req.end();
|
||||
});
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user