Skip to content

Commit

Permalink
fix(processMessage): await processMessage and handle object
Browse files Browse the repository at this point in the history
  • Loading branch information
nmalzieu committed Nov 20, 2024
1 parent a955447 commit 64ffe9d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -857,8 +857,12 @@ export async function processMessage<
id: ConversationId,
encryptedMessage: string
): Promise<DecodedMessage<ContentTypes>> {
const json = XMTPModule.processMessage(client.inboxId, id, encryptedMessage)
return DecodedMessage.from(json, client)
const obj = await XMTPModule.processMessage(
client.inboxId,
id,
encryptedMessage
)
return DecodedMessage.fromObject(obj, client)
}

export async function processWelcomeMessage<
Expand Down

0 comments on commit 64ffe9d

Please sign in to comment.