react-native-sinch-calling 0.7.0 → 0.7.1

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.
@@ -170,7 +170,16 @@ class SinchCallManager(private val context: Context) {
170
170
  return
171
171
  }
172
172
 
173
- val result = SinchPush.queryPushNotificationPayload(context.applicationContext, payload)
173
+ // The consumer app's own unrelated notifications (a task reminder, a new
174
+ // message, ...) share this same FCM sender and get relayed here too —
175
+ // `queryPushNotificationPayload` throws for anything that isn't shaped
176
+ // like a genuine Sinch-issued payload, so a non-call push must not
177
+ // propagate that as an uncaught native exception up through the bridge.
178
+ val result = try {
179
+ SinchPush.queryPushNotificationPayload(context.applicationContext, payload)
180
+ } catch (error: IllegalArgumentException) {
181
+ return
182
+ }
174
183
  client?.relayRemotePushNotification(result)
175
184
  }
176
185
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-sinch-calling",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "React Native TurboModule wrapper for Sinch Voice Calling SDK (Android & iOS)",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",