Skip to content

Commit

Permalink
Merge pull request #543 from xmtp/noe/fix-group-process-message-3
Browse files Browse the repository at this point in the history
fix(processMessage): await processMessage and handle object
  • Loading branch information
nmalzieu authored Nov 20, 2024
2 parents a955447 + 8c16cba commit 5c9bf88
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
}

Expand Down
6 changes: 5 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,11 @@ export async function processMessage<
id: ConversationId,
encryptedMessage: string
): Promise<DecodedMessage<ContentTypes>> {
const json = XMTPModule.processMessage(client.inboxId, id, encryptedMessage)
const json = await XMTPModule.processMessage(
client.inboxId,
id,
encryptedMessage
)
return DecodedMessage.from(json, client)
}

Expand Down

0 comments on commit 5c9bf88

Please sign in to comment.