@trycourier/courier-react-native 5.2.2 → 5.2.3

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.
@@ -266,7 +266,7 @@ class CourierSharedModule(reactContext: ReactApplicationContext): ReactNativeMod
266
266
  },
267
267
  onArchiveChanged = { messageSet ->
268
268
  reactApplicationContext.sendEvent(
269
- eventName = feedId,
269
+ eventName = archiveId,
270
270
  value = messageSet.toJson()
271
271
  )
272
272
  },
@@ -297,7 +297,7 @@ class CourierSharedModule(reactContext: ReactApplicationContext): ReactNativeMod
297
297
  json.putInt("index", index)
298
298
  json.putString("message", message.toJson())
299
299
  reactApplicationContext.sendEvent(
300
- eventName = messageAddedId,
300
+ eventName = messageChangedId,
301
301
  value = json
302
302
  )
303
303
  },
@@ -307,7 +307,7 @@ class CourierSharedModule(reactContext: ReactApplicationContext): ReactNativeMod
307
307
  json.putInt("index", index)
308
308
  json.putString("message", message.toJson())
309
309
  reactApplicationContext.sendEvent(
310
- eventName = messageAddedId,
310
+ eventName = messageRemovedId,
311
311
  value = json
312
312
  )
313
313
  },
@@ -29,7 +29,7 @@ abstract class ReactNativeModule(val tag: String, private val name: String, reac
29
29
  }
30
30
 
31
31
  internal fun Promise.apiError(throwable: Throwable) {
32
- reject(throwable.message, tag, throwable)
32
+ throwable.message?.let { reject(it, tag, throwable) }
33
33
  }
34
34
 
35
35
  }
@@ -15,7 +15,7 @@ import com.facebook.react.modules.core.DeviceEventManagerModule
15
15
  import com.google.gson.GsonBuilder
16
16
 
17
17
  internal object Utils {
18
- val COURIER_AGENT = CourierAgent.ReactNativeAndroid(version = "5.2.2")
18
+ val COURIER_AGENT = CourierAgent.ReactNativeAndroid(version = "5.2.3")
19
19
  }
20
20
 
21
21
  internal fun ReactContext.sendEvent(eventName: String, value: Any?) {
@@ -22,7 +22,7 @@ NSUInteger notificationPresentationOptions = UNNotificationPresentationOptionNon
22
22
  if (self) {
23
23
 
24
24
  // Set the user agent
25
- Courier.agent = [CourierAgent reactNativeIOS:@"5.2.2"];
25
+ Courier.agent = [CourierAgent reactNativeIOS:@"5.2.3"];
26
26
 
27
27
  // Register for remote notifications
28
28
  UIApplication *app = [UIApplication sharedApplication];
@@ -14,7 +14,7 @@ internal class CourierReactNativeEventEmitter: RCTEventEmitter {
14
14
 
15
15
  // Set the user agent
16
16
  // Used to know the platform performing requests
17
- Courier.agent = CourierAgent.reactNativeIOS("5.2.2")
17
+ Courier.agent = CourierAgent.reactNativeIOS("5.2.3")
18
18
 
19
19
  }
20
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trycourier/courier-react-native",
3
- "version": "5.2.2",
3
+ "version": "5.2.3",
4
4
  "description": "Inbox, Push Notifications, and Preferences for React Native",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",