From fa9166884c4e29040a80cd7320ad0f234548356d Mon Sep 17 00:00:00 2001 From: Jagdish Choudhary Date: Tue, 28 Oct 2025 07:26:50 +0530 Subject: [PATCH] fix: ensure subscriptionCallback is passed during push notification re-registration When a different FCM key exists and push subscription fails, the SDK unregisters and registers again. However, during the re-registration process, the subscriptionCallback function was not being passed to the notifications.push() call, causing the callback to not be executed. This fix ensures that the subscriptionCallback parameter is included when calling notifications.push() during the unsubscription error handling flow, allowing the callback to be properly executed after successful re-registration. Fixes issue where subscriptionCallback was not called after FCM key change and subsequent push notification re-registration. --- src/modules/notification.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/notification.js b/src/modules/notification.js index c75ecf29..c5496efa 100644 --- a/src/modules/notification.js +++ b/src/modules/notification.js @@ -326,7 +326,8 @@ export default class NotificationHandler extends Array { // You've successfully unsubscribed this.#logger.info('Unsubscription successful') window.clevertap.notifications.push({ - skipDialog: true + skipDialog: true, + subscriptionCallback: subscriptionCallback }) }).catch((e) => { // Unsubscription failed