diff --git a/dictation_server/.env.local.example b/dictation_server/.env.local.example index c4deccc..5cfa845 100644 --- a/dictation_server/.env.local.example +++ b/dictation_server/.env.local.example @@ -13,7 +13,7 @@ JWT_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEA5IZZNgDew9eGmu JWT_PUBLIC_KEY="-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5IZZNgDew9eGmuFTezwd\nHYLSaJvUPPIKYoiOeVLD1paWNI517Vkaoh0ngprcKOdv6T1N07V4igK7mOim2zY3\nyCTR6wcWR3PfFJrl9vh5SOo79koZoJb27YiM4jtxfx2dezzp0T2GoNR5rRolPUbW\nFJXnDe0DVXYXpJLb4LAlF2XAyYX0SYKUVUsJnzm5k4xbXtnwPwVbpm0EdswBE6qS\nfiL9zWk9dvHoKzSnfSDzDFoFcEoVchawzYXf/MM1YR4wo5XyzECc6Q5Ah4z522//\nmBNNaDHv83Yuw3mGShT73iJ0JQdkTturshv2Ecma38r6ftrIwNYXw4VVatJM8+GO\nOQIDAQAB\n-----END PUBLIC KEY-----\n" SENDGRID_API_KEY=xxxxxxxxxxxxxxxx MAIL_FROM=xxxxx@xxxxx.xxxx -NOTIFICATION_HUB_NAME=ntf-odms-shared +NOTIFICATION_HUB_NAME=ntf-odms-dev NOTIFICATION_HUB_CONNECT_STRING=XXXXXXXXXXXXXXXXXX APP_DOMAIN=http://localhost:8081/ STORAGE_ACCOUNT_NAME_US=saodmsusdev diff --git a/dictation_server/src/constants/index.ts b/dictation_server/src/constants/index.ts index 33607ce..1a0852e 100644 --- a/dictation_server/src/constants/index.ts +++ b/dictation_server/src/constants/index.ts @@ -187,7 +187,6 @@ export const TAG_MAX_COUNT = 20; export const PNS = { WNS: 'wns', APNS: 'apns', - FCM: 'fcm', }; /** diff --git a/dictation_server/src/gateways/notificationhub/notificationhub.service.ts b/dictation_server/src/gateways/notificationhub/notificationhub.service.ts index 6c0958a..dfc44cc 100644 --- a/dictation_server/src/gateways/notificationhub/notificationhub.service.ts +++ b/dictation_server/src/gateways/notificationhub/notificationhub.service.ts @@ -5,12 +5,9 @@ import { createAppleNotificationBody, createAppleNotification, createTagExpression, - createFcmLegacyNotification, createWindowsToastNotification, - createFirebaseLegacyNotificationBody, createWindowsInstallation, createAppleInstallation, - createFcmLegacyInstallation, } from '@azure/notification-hubs'; import { TAG_MAX_COUNT } from '../../constants'; import { PNS } from '../../constants'; @@ -62,11 +59,6 @@ export class NotificationhubService { createAppleInstallation(installation), ); break; - case PNS.FCM: - await this.client.createOrUpdateInstallation( - createFcmLegacyInstallation(installation), - ); - break; default: throw new Error('invalid pns'); } @@ -117,19 +109,6 @@ export class NotificationhubService { } catch (e) { this.logger.error(`error=${e}`); } - // Android - try { - const body = createFirebaseLegacyNotificationBody({ - data: { message: message }, - }); - const notification = createFcmLegacyNotification({ body }); - const result = await this.client.sendNotification(notification, { - tagExpression, - }); - this.logger.log(result); - } catch (e) { - this.logger.error(`error=${e}`); - } } } catch (e) { throw e;