Skip to content

Commit

Permalink
Merge pull request #11 from xmtp/dj/read-receipts
Browse files Browse the repository at this point in the history
Send fix
  • Loading branch information
daria-github committed Jul 27, 2023
2 parents 6e9dc30 + 99a7c2b commit ef456da
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/model/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,12 @@ export async function sendMessage(
}
}

const xmtpConversation = await getXMTPConversation(client, conversation);
const decodedMessage = await xmtpConversation.send(content, {
contentType,
});

if (message.contentType.typeId !== "readReceipt") {
const xmtpConversation = await getXMTPConversation(client, conversation);
const decodedMessage = await xmtpConversation.send(content, {
contentType,
});
await db.messages.update(message.id!, {
xmtpID: decodedMessage.id,
sentAt: decodedMessage.sent,
Expand Down

0 comments on commit ef456da

Please sign in to comment.