From dc32b5ac6718956c21a48623575c185d1308dbc2 Mon Sep 17 00:00:00 2001 From: "makabe.t" Date: Mon, 31 Jul 2023 08:22:33 +0000 Subject: [PATCH] =?UTF-8?q?Merged=20PR=20286:=20=E4=B8=8D=E8=A6=81?= =?UTF-8?q?=E3=81=AAFCM=E5=90=91=E3=81=91=E5=87=A6=E7=90=86=E3=82=92?= =?UTF-8?q?=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 概要 [Task2304: 不要なFCM向け処理を削除](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/2304) - 通知処理についてFCM向けの処理は仮検証コードなので削除しました。 ## レビューポイント - 削除内容に問題はないか ## UIの変更 - なし ## 動作確認状況 - ローカルで確認 --- dictation_server/.env.local.example | 2 +- dictation_server/src/constants/index.ts | 1 - .../notificationhub.service.ts | 21 ------------------- 3 files changed, 1 insertion(+), 23 deletions(-) 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;