Skip to content

Commit

Permalink
🚀 5.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemilla committed Dec 10, 2024
1 parent 1f50384 commit b5c2d4b
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ class CourierSharedModule(reactContext: ReactApplicationContext): ReactNativeMod
},
onArchiveChanged = { messageSet ->
reactApplicationContext.sendEvent(
eventName = feedId,
eventName = archiveId,
value = messageSet.toJson()
)
},
Expand Down Expand Up @@ -297,7 +297,7 @@ class CourierSharedModule(reactContext: ReactApplicationContext): ReactNativeMod
json.putInt("index", index)
json.putString("message", message.toJson())
reactApplicationContext.sendEvent(
eventName = messageAddedId,
eventName = messageChangedId,
value = json
)
},
Expand All @@ -307,7 +307,7 @@ class CourierSharedModule(reactContext: ReactApplicationContext): ReactNativeMod
json.putInt("index", index)
json.putString("message", message.toJson())
reactApplicationContext.sendEvent(
eventName = messageAddedId,
eventName = messageRemovedId,
value = json
)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ abstract class ReactNativeModule(val tag: String, private val name: String, reac
}

internal fun Promise.apiError(throwable: Throwable) {
reject(throwable.message, tag, throwable)
throwable.message?.let { reject(it, tag, throwable) }
}

}
2 changes: 1 addition & 1 deletion android/src/main/java/com/courierreactnative/Utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import com.facebook.react.modules.core.DeviceEventManagerModule
import com.google.gson.GsonBuilder

internal object Utils {
val COURIER_AGENT = CourierAgent.ReactNativeAndroid(version = "5.2.2")
val COURIER_AGENT = CourierAgent.ReactNativeAndroid(version = "5.2.3")
}

internal fun ReactContext.sendEvent(eventName: String, value: Any?) {
Expand Down
4 changes: 2 additions & 2 deletions example/src/pages/inbox/InboxCustom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ const InboxCustom = () => {
async function toggleMessage() {
const messageId = props.message.messageId;
await Courier.shared.clickMessage({ messageId: messageId });
const message = isRead ? await Courier.shared.unreadMessage({ messageId: messageId }) : await Courier.shared.readMessage({ messageId: messageId });
console.log(message);
isRead ? await Courier.shared.unreadMessage({ messageId: messageId }) : await Courier.shared.readMessage({ messageId: messageId });
console.log(props.message);
}

return (
Expand Down
2 changes: 1 addition & 1 deletion ios/CourierReactNativeDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ - (id) init {
if (self) {

// Set the user agent
Courier.agent = [CourierAgent reactNativeIOS:@"5.2.2"];
Courier.agent = [CourierAgent reactNativeIOS:@"5.2.3"];

// Register for remote notifications
UIApplication *app = [UIApplication sharedApplication];
Expand Down
2 changes: 1 addition & 1 deletion ios/CourierReactNativeEventEmitter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ internal class CourierReactNativeEventEmitter: RCTEventEmitter {

// Set the user agent
// Used to know the platform performing requests
Courier.agent = CourierAgent.reactNativeIOS("5.2.2")
Courier.agent = CourierAgent.reactNativeIOS("5.2.3")

}

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@trycourier/courier-react-native",
"version": "5.2.2",
"version": "5.2.3",
"description": "Inbox, Push Notifications, and Preferences for React Native",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down

0 comments on commit b5c2d4b

Please sign in to comment.