From d350f6be9a433b5a1f69a26d971c1f73eaa845d4 Mon Sep 17 00:00:00 2001 From: regalijan Date: Thu, 19 Oct 2023 16:51:17 -0400 Subject: [PATCH] Don't double-stringify fcm payloads --- functions/gcloud.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/gcloud.ts b/functions/gcloud.ts index 1809acd..d6f0aa0 100644 --- a/functions/gcloud.ts +++ b/functions/gcloud.ts @@ -276,13 +276,13 @@ export async function sendPushNotification( body: string, token?: string, ) { - const message = JSON.stringify({ + const message = { notification: { body, title, }, token, - }); + }; const notifResp = await fetch( "https://fcm.googleapis.com/v1/projects/car-crushers-mobile/messages:send",