diff --git a/android/src/main/java/expo/modules/xmtpreactnativesdk/XMTPModule.kt b/android/src/main/java/expo/modules/xmtpreactnativesdk/XMTPModule.kt index 454c04c1..d2c608d3 100644 --- a/android/src/main/java/expo/modules/xmtpreactnativesdk/XMTPModule.kt +++ b/android/src/main/java/expo/modules/xmtpreactnativesdk/XMTPModule.kt @@ -1060,7 +1060,7 @@ class XMTPModule : Module() { val conversation = client.findConversation(id) ?: throw XMTPException("no conversation found for $id") val message = conversation.processMessage(Base64.decode(encryptedMessage, NO_WRAP)) - DecodedMessageWrapper.encodeMap(message.decode()) + DecodedMessageWrapper.encode(message.decode()) } } diff --git a/src/index.ts b/src/index.ts index 33a4ba78..59815a0b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -857,7 +857,11 @@ export async function processMessage< id: ConversationId, encryptedMessage: string ): Promise> { - const json = XMTPModule.processMessage(client.inboxId, id, encryptedMessage) + const json = await XMTPModule.processMessage( + client.inboxId, + id, + encryptedMessage + ) return DecodedMessage.from(json, client) }