From 53e78fefce61c65dbf05fadf3c181a341e7d6ec9 Mon Sep 17 00:00:00 2001 From: Jade Date: Wed, 18 Jun 2025 10:45:02 +0000 Subject: [PATCH] feat: release --- CHANGELOG.md | 35 +++++++++++++++++++++++++++++++++++ MainSDK.js | 8 ++++++-- package.json | 2 +- 3 files changed, 42 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa60858..c928362 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,38 @@ +## 2.0.6 (2025-06-18) + + +### Bug Fixes + +* **gcm:** message variability (544eb08) +* **sdk:** sid logic (#43) (570c075) + + +### Features + +* add array to track wish request (da7bc28) +* add autoSendPushToken argument (2826b68) +* add blank search method (#40) (ff10756) +* add cart method (7a0dd8b) +* add custom properties to track purchase request (d58f5af) +* add date check (a9b7069) +* add excluded_merchants property to search types (#46) (0912cee) +* add function to send token after app initialization (7a7bd29) +* add functions to get and push token sent date in storage (75e5ce0) +* add new action step to identify base commit in master (95930a9) +* add persona-synchronization.yaml (17ddf01) +* add types (ffec1d5) +* add types to functions (1cf1b75) +* BREAKING CHANGE use @notifee/react-native for requesting alarm permissions (0e23088) +* check application initialization (152e928) +* check image_url (#44) (0cfcfab) +* connect sdk to dev app (48788fa) +* move to sdk (85a1e1e) +* **sdk:** remove notifee (71e7e79) +* **sdk:** track mobile pushes (eadf5f4) +* swap auto-changelog for standard-changelog (ec88b46) + + + ## 2.0.5 (2024-12-26) diff --git a/MainSDK.js b/MainSDK.js index ef75eee..ccefd00 100644 --- a/MainSDK.js +++ b/MainSDK.js @@ -33,11 +33,14 @@ import {blankSearchRequest, isOverOneWeekAgo} from './utils'; /** * @typedef {Object} GoogleData * @property {string} message_id + * @property {string} ["gcm.message_id"] */ /** * @typedef {Object} Data * @property {string} message_id + * @property {string} ["google.message_id"] + * @property {string} ["gcm.message_id"] * @property {string} from * @property {number} ttl * @property {number} sentTime @@ -550,7 +553,8 @@ class MainSDK extends Performer { if (!notifyClick) { await this.pushClickListener(notification) } else { - const data = await getPushData(notification.data.message_id, this.shop_id) + const messageId = notification.data.message_id || notification.data['google.message_id'] || notification.data['gcm.message_id'] + const data = await getPushData(messageId, this.shop_id) await this.pushClickListener(data && data.length > 0 ? data[0] : false) } } @@ -659,7 +663,7 @@ class MainSDK extends Performer { * @returns {Promise} */ async onClickPush (notification) { - const messageId = notification.data.message_id || notification.data['google.message_id']; + const messageId = notification.data.message_id || notification.data['google.message_id'] || notification.data['gcm.message_id']; let pushData = await getPushData(messageId, this.shop_id); if (pushData.length === 0) return false; diff --git a/package.json b/package.json index 8979fb3..7a7f05b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@personaclick/rn-sdk", - "version": "2.0.5", + "version": "2.0.6", "description": "PersonaClick React Native SDK", "exports": { ".": "./index.js"