Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
fix(calls): allow native Android call pushes to publish to FCM (#8880)
Peter Chinman42173332c045
diff --git a/docs/development/android.md b/docs/development/android.mdindex 3557c3d4e4..25b91a582e 100644--- a/docs/development/android.md+++ b/docs/development/android.md@@ -856,7 +856,11 @@ capable app re-registers. Deploy the device-capability migration before servicesdeploy the notification ingress and call-producing services before enabling thenew client registration. Native delivery suppresses ordinary alerts only for theplatform and capable Android endpoints it handles, so another device can still-receive its fallback alert.+receive its fallback alert. The document storage service publishes call pushes+itself, so the `cloud-storage-service` stack grants its task role `sns:Publish`+on both the APNS VoIP and FCM platform applications; without the FCM grant every+native Android call fails at SNS (`AuthorizationError`) and falls back to an+ordinary alert.Call pushes are data-only, high priority, have a 60-second TTL, and include a recipient-specificLiveKit token and HTTPS ring-status URL. The receiver checks the registereddiff --git a/infra/packages/shared/src/macro_notify.ts b/infra/packages/shared/src/macro_notify.tsindex 002887cf67..e2e6bd9421 100644--- a/infra/packages/shared/src/macro_notify.ts+++ b/infra/packages/shared/src/macro_notify.ts@@ -5,6 +5,7 @@ export function getMacroNotify(): {notificationIngressQueueName: pulumi.Output<string>;notificationIngressQueueArn: pulumi.Output<string>;notificationApnsVoipPlatformArn: pulumi.Output<string>;+ notificationFcmPlatformArn: pulumi.Output<string>;} {const notificationServiceStack = new pulumi.StackReference('notification-service-stack',@@ -28,9 +29,25 @@ export function getMacroNotify(): {.requireOutput('notificationApnsVoipPlatformArn').apply((arn) => arn as string);+ // Read from the long-deployed platform list rather than a new output: stacks+ // deploy in parallel, so a consumer could run before the new output exists.+ const notificationFcmPlatformArn: pulumi.Output<string> =+ notificationServiceStack+ .requireOutput('notificationSnsPlatformArns')+ .apply((arns) => {+ const fcmArn = (arns as string[]).find((arn) =>+ arn.includes(':app/GCM/')+ );+ if (!fcmArn) {+ throw new Error('notification-service exports no FCM platform');+ }+ return fcmArn;+ });+return {notificationIngressQueueName,notificationIngressQueueArn,notificationApnsVoipPlatformArn,+ notificationFcmPlatformArn,};}diff --git a/infra/stacks/cloud-storage-service/index.ts b/infra/stacks/cloud-storage-service/index.tsindex 92648237e6..a99ae5dc1d 100644--- a/infra/stacks/cloud-storage-service/index.ts+++ b/infra/stacks/cloud-storage-service/index.ts@@ -166,6 +166,7 @@ const gmailOpsQueueArn: pulumi.Output<string> = emailServiceStackconst {notificationIngressQueueArn,notificationApnsVoipPlatformArn: snsApnsVoipPlatformArn,+ notificationFcmPlatformArn: snsFcmPlatformArn,} = getMacroNotify();// To re-use this secret name after a destroy, you will need to delete the secret without recovery to prevent conflict:@@ -379,7 +380,8 @@ const cloudStorageService = new CloudStorageService(],slackImportUploadPolicyArn: slackImportQueue.uploadPolicy.arn,callRecordingCrudPolicyArn,- snsPlatformArns: [snsApnsVoipPlatformArn],+ // Native call pushes: iOS PushKit and Android FCM.+ snsPlatformArns: [snsApnsVoipPlatformArn, snsFcmPlatformArn],containerEnvVars: [{name: 'GITHUB_PULL_REQUEST_PATCH_BUCKET',