Skip to content

Commit

Permalink
fix send
Browse files Browse the repository at this point in the history
  • Loading branch information
daria-github committed Jul 27, 2023
1 parent b39a09a commit 99a7c2b
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 99a7c2b

Please sign in to comment.