Skip to content

Commit

Permalink
fixed send push notification to tag expression
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldisaro committed Jun 24, 2024
1 parent 086602e commit c2f5f3f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion utils/notification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ export const nhResultSuccess = t.interface({

export type NHResultSuccess = t.TypeOf<typeof nhResultSuccess>;

export const toTagExpression = (fiscalCodeHash: NonEmptyString): any =>
`$InstallationId:{${fiscalCodeHash}}`;

export const notify = (
notificationHubService: NotificationHubsClient,
payload: NotifyMessagePayload,
Expand All @@ -110,7 +113,7 @@ export const notify = (
TE.tryCatch(
() =>
notificationHubService.sendNotification(notification, {
deviceHandle: installationId
tagExpression: toTagExpression(installationId)
}),
errs =>
new Error(
Expand Down

0 comments on commit c2f5f3f

Please sign in to comment.