notifly-sdk 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -7
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -18,12 +18,9 @@ exports.sessionStart = async function () {
|
|
|
18
18
|
const apiLevel = rnDeviceInfo.getApiLevel(); // only android
|
|
19
19
|
const brand = rnDeviceInfo.getBrand(); // apple samsung
|
|
20
20
|
const model = rnDeviceInfo.getModel(); // 기종 SM-G960N or iPhone 8
|
|
21
|
-
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
22
21
|
const platform = Platform.OS;
|
|
23
22
|
const deviceInfo = await Promise.all([model, brand, apiLevel]);
|
|
24
23
|
const openAppEventParams = {
|
|
25
|
-
"timezone": timezone,
|
|
26
|
-
"app_id": 'test_app',
|
|
27
24
|
"platform": platform,
|
|
28
25
|
"device_model": deviceInfo[0],
|
|
29
26
|
"properties": {
|
|
@@ -32,7 +29,6 @@ exports.sessionStart = async function () {
|
|
|
32
29
|
},
|
|
33
30
|
}
|
|
34
31
|
await logEvent("session_start", openAppEventParams, null, true)
|
|
35
|
-
|
|
36
32
|
}
|
|
37
33
|
|
|
38
34
|
exports.initialize = async function (prjId, userName, password) {
|
|
@@ -119,10 +115,8 @@ exports.foregroundSetting = function () {
|
|
|
119
115
|
try {
|
|
120
116
|
if (notification.data.link) {
|
|
121
117
|
Linking.openURL(notification.data.link)
|
|
122
|
-
await logEvent("push_click", { "campaign_id": campaign_id, "status": "foreground" }, null, true);
|
|
123
|
-
} else {
|
|
124
|
-
await logEvent("push_click", { "campaign_id": campaign_id, "status": "foreground" }, null, true);
|
|
125
118
|
}
|
|
119
|
+
await logEvent("push_click", { "campaign_id": campaign_id, "status": "foreground" }, null, true);
|
|
126
120
|
} catch (err) {
|
|
127
121
|
console.error('[Notifly]: ', err);
|
|
128
122
|
}
|