From 9dafdcb9f29877d904bf16c04a83143d9dcc16e2 Mon Sep 17 00:00:00 2001 From: pankajjangid05 Date: Thu, 24 Aug 2023 18:24:19 +0530 Subject: [PATCH] [Hot Fix] - Resolved notification botName error --- .../adapter/firebase/web/FirebaseNotificationAdapter.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/uci/adapter/firebase/web/FirebaseNotificationAdapter.java b/src/main/java/com/uci/adapter/firebase/web/FirebaseNotificationAdapter.java index 288da8e..c97acbd 100644 --- a/src/main/java/com/uci/adapter/firebase/web/FirebaseNotificationAdapter.java +++ b/src/main/java/com/uci/adapter/firebase/web/FirebaseNotificationAdapter.java @@ -255,8 +255,7 @@ public Mono> apply(List msgList) { .setBody(nextMsg.getPayload().getText()) .build(); } - String botName = nextMsg.getApp().replaceAll(" ", "_"); - log.info("FirebaseNotificationAdapter:processOutBoundMessageF:: BotName : " + botName + " : fcmAndroidConfigTTl : " + fcmAndroidConfigTTl); + log.info("FirebaseNotificationAdapter:processOutBoundMessageF:: fcmAndroidConfigTTl : " + fcmAndroidConfigTTl); Message message = Message.builder() .setNotification(notification) .setToken(data.get("fcmToken")) @@ -266,7 +265,7 @@ public Mono> apply(List msgList) { .putData("destAdd", nextMsg.getTo().getUserID()) .putData("fcmDestAdd", data.get("fcmToken")) .putData("click_action", click_action) - .setFcmOptions(FcmOptions.withAnalyticsLabel(botName)) + .setFcmOptions(FcmOptions.withAnalyticsLabel(nextMsg.getBotId().toString())) .setAndroidConfig(AndroidConfig.builder().setTtl(1000 * fcmAndroidConfigTTl).build()) .putAllData(dataMap) .build();