add send text message function

This commit is contained in:
liamcottle 2025-02-12 23:00:07 +13:00
parent 8dc58d60c4
commit 272ece07e8
2 changed files with 27 additions and 9 deletions

View file

@ -291,15 +291,9 @@
return;
}
// compose message
const txtType = Constants.TxtTypes.Plain;
const attempt = 0;
const senderTimestamp = Math.floor(Date.now() / 1000);
const pubKeyPrefix = contact.publicKey;
const text = message;
// send message
await this.connection.sendCommandSendTxtMsg(txtType, attempt, senderTimestamp, pubKeyPrefix, text);
const response = await this.connection.sendTextMessage(contact.publicKey, message);
console.log(response);
},
async resetPath(contact) {