commit 1eed8b9c855053a148a2f8d208b9bce93b3f0f16
parent a76af58b9f0a0510ff7cdeb348d9b9b165387fc5
Author: Michael Camilleri <[email protected]>
Date: Fri, 12 Jun 2026 11:41:40 +0900
Reenable sound for session begin notifications
Diffstat:
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/Workers/push-worker.js b/Workers/push-worker.js
@@ -466,20 +466,13 @@ export class PushRegistry {
? "api.sandbox.push.apple.com"
: "api.push.apple.com";
const jwt = await this.providerJWT();
- // "play" presence is the noisiest, least-actionable alert kind: deliver
- // it without a sound and at power-considerate priority so a backgrounded
- // peer isn't pinged every time someone opens the puzzle. Other alert
- // kinds (win/resign/pause) keep the sound and immediate priority.
- const presence = !message.background && message.kind === "play";
const alert = {};
if (message.title) alert.title = message.title;
if (message.body) alert.body = message.body;
- const aps = message.background
- ? { "content-available": 1 }
- : { alert, "mutable-content": 1 };
- if (!message.background && !presence) aps.sound = "default";
const apnsPayload = {
- aps,
+ aps: message.background
+ ? { "content-available": 1 }
+ : { alert, sound: "default", "mutable-content": 1 },
kind: message.kind
};
if (message.gameID) apnsPayload.gameID = message.gameID;