You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There appears to be an inconsistency in the typing of the OSNotification in the OneSignal React Native SDK. The event JSON received from the notification contains a property launchUrl, but the OSNotification type defines this property as launchURL (with an uppercase "URL").
Steps to reproduce?
1. implement a notification click handler as below
`const onNotificationClicked = (event: NotificationClickEvent) => {
const { notification } = event;
if (notification.launchURL) {
Linking.canOpenURL(notification.launchURL).then((supported) => {
if (supported) {
Linking.openURL(notification.launchURL || '');
}
});
}
};
OneSignal.Notifications.addEventListener('click', onNotificationClicked);`
2. Trigger a notification and click on it to handle the event.
3. Observe that the notification object contains launchUrl instead of launchURL.
What did you expect to happen?
The type definition for NotificationClickEvent should match the actual property in the JSON payload received from the event.
What happened?
There appears to be an inconsistency in the typing of the OSNotification in the OneSignal React Native SDK. The event JSON received from the notification contains a property launchUrl, but the OSNotification type defines this property as launchURL (with an uppercase "URL").
Steps to reproduce?
What did you expect to happen?
The type definition for NotificationClickEvent should match the actual property in the JSON payload received from the event.
React Native OneSignal SDK version
5.2.0
Which platform(s) are affected?
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: