Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(relay): keep concurrent threads from hiding iOS push alerts #11073

Closedcatfogtoad(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/11073/headopened View on GitHub

Showing 3 changed files with 168 additions and 3 deletions (loading 1).

x
0 of 3 viewed, 3 left
5 additions and 0 deletionsinfra/relay/src/agentActivity/AgentActivityPublisher.tsModified
View file
@@ -54,6 +54,7 @@
const apnsDeliveries = yield* ApnsDeliveries.ApnsDeliveries;
const fcmDeliveries = yield* FcmDeliveries.FcmDeliveries;
​
+ /** Keeps environment channel settings separate from each device's delivery settings. */
const publishForDeliveryUser = Effect.fnUntraced(function* (input: {
readonly deliveryUser: EnvironmentLinks.AgentAwarenessDeliveryUserRecord;
readonly state: RelayAgentActivityState | null;
@@ -91,6 +92,10 @@
apnsDeliveries.sendForTarget({
target,
aggregate: liveActivityAggregate,
+ notificationState:
+ input.deliveryUser.liveActivitiesEnabled && input.deliveryUser.notificationsEnabled
+ ? input.state
+ : null,
nowMs: input.nowMs,
}),
notificationOnlyAggregate === null
163 additions and 3 deletionsinfra/relay/src/agentActivity/ApnsDeliveries.test.tsModified
View file
@@ -34,6 +34,9 @@
import * as ApnsDeliveries from "./ApnsDeliveries.ts";
import * as ApnsClient from "./ApnsClient.ts";
import * as ApnsProviderTokens from "./ApnsProviderTokens.ts";
+import * as AgentActivityPublisher from "./AgentActivityPublisher.ts";
+import * as EnvironmentLinks from "../environments/EnvironmentLinks.ts";