Support private text with one known public key
This commit is contained in:
1 parent
fd7b93c52d
commit
ea4917b322
7 files changed
+377
-8
No files matched your search
@@ -570,7 +570,8 @@ mesh::Packet* BaseChatMesh::composeMsgPacket(const ContactInfo& recipient, uint3
|
||||
int BaseChatMesh::sendMessage(const ContactInfo& recipient, uint32_t timestamp, uint8_t attempt, const char* text,
|
||||
uint32_t& expected_ack, uint32_t& est_timeout, uint8_t* packet_hash,
|
||||
const uint8_t* replace_retry_key,
|
||||
const uint8_t* message_retry_key) {
|
||||
const uint8_t* message_retry_key,
|
||||
uint32_t delay_millis) {
|
||||
mesh::Packet* pkt = composeMsgPacket(recipient, timestamp, attempt, text, expected_ack);
|
||||
if (pkt == NULL) return MSG_SEND_FAILED;
|
||||
if (packet_hash != NULL) {
|
||||
@@ -588,12 +589,12 @@ int BaseChatMesh::sendMessage(const ContactInfo& recipient, uint32_t timestamp,
|
||||
int rc;
|
||||
bool sent;
|
||||
if (recipient.out_path_len == OUT_PATH_UNKNOWN) {
|
||||
sent = sendFloodScoped(recipient, pkt);
|
||||
est_timeout = calcFloodTimeoutMillisFor(t);
|
||||
sent = sendFloodScoped(recipient, pkt, delay_millis);
|
||||
est_timeout = delay_millis + calcFloodTimeoutMillisFor(t);
|
||||
rc = MSG_SEND_SENT_FLOOD;
|
||||
} else {
|
||||
sent = sendDirect(pkt, recipient.getPath(), recipient.out_path_len);
|
||||
est_timeout = calcDirectTimeoutMillisFor(t, recipient.out_path_len);
|
||||
sent = sendDirect(pkt, recipient.getPath(), recipient.out_path_len, delay_millis);
|
||||
est_timeout = delay_millis + calcDirectTimeoutMillisFor(t, recipient.out_path_len);
|
||||
rc = MSG_SEND_SENT_DIRECT;
|
||||
}
|
||||
if (!sent) {
|
||||
|
||||
Reference in new issue
Block a user