From c2f5f3f15f2307df4b4a1a7dd717dfe98a3df739 Mon Sep 17 00:00:00 2001 From: Michael Disaro Date: Mon, 24 Jun 2024 14:52:50 +0200 Subject: [PATCH] fixed send push notification to tag expression --- utils/notification.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utils/notification.ts b/utils/notification.ts index babcc7e..d390f2e 100644 --- a/utils/notification.ts +++ b/utils/notification.ts @@ -98,6 +98,9 @@ export const nhResultSuccess = t.interface({ export type NHResultSuccess = t.TypeOf; +export const toTagExpression = (fiscalCodeHash: NonEmptyString): any => + `$InstallationId:{${fiscalCodeHash}}`; + export const notify = ( notificationHubService: NotificationHubsClient, payload: NotifyMessagePayload, @@ -110,7 +113,7 @@ export const notify = ( TE.tryCatch( () => notificationHubService.sendNotification(notification, { - deviceHandle: installationId + tagExpression: toTagExpression(installationId) }), errs => new Error(