Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)


Expand Down
8 changes: 6 additions & 2 deletions MainSDK.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}
}
Expand Down Expand Up @@ -659,7 +663,7 @@ class MainSDK extends Performer {
* @returns {Promise<boolean | Error | void>}
*/
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;

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@personaclick/rn-sdk",
"version": "2.0.5",
"version": "2.0.6",
"description": "PersonaClick React Native SDK",
"exports": {
".": "./index.js"
Expand Down