braze-react-native-sdk
braze-react-native-sdk copied to clipboard
[Bug]: PushNotificationEvent.timestamp is both seconds and milliseconds depending on the OS
Which Platforms?
Both
Which React Native Version?
0.76.7
Which @braze/react-native-sdk SDK version?
12.2.0
Repro Rate
100%
Steps To Reproduce
Example:
import BrazeSDK from "@braze/react-native-sdk".- Add a listener for Braze push notification events
BrazeSDK.addListener(
BrazeSDK.Events.PUSH_NOTIFICATION_EVENT,
(pushNotificationEvent) => {
console.log(pushNotificationEvent.timestamp);
},
);
- Run the app and send a test notification
Expected Behavior
Both Android and iOS should have the same time unit for the PushNotificationEvent.timestamp. They should both be in seconds or both be in milliseconds.
Actual Incorrect Behavior
- Android:
pushNotificationEvent.timestampis the number of milliseconds since 1970 - iOS:
pushNotificationEvent.timestampis the number of seconds since 1970
Verbose Logs
Additional Information
No response