mirror of
https://github.com/ratspeak/rsLXMF
synced 2026-11-22 23:10:35 +00:00
lxmd: bind receipts to destination identity
This commit is contained in:
1 parent
93f4257068
commit
68f84ce0a6
1 file changed
+10
@@ -2345,6 +2345,7 @@ impl LxmdRunner {
|
||||
}
|
||||
|
||||
let msg_hash = message.hash;
|
||||
let destination_public_key = self.known_identities.get(&dest_hex).copied();
|
||||
let mut missing_identity = false;
|
||||
let payload = match message.pack_opportunistic_encrypted(|plaintext| {
|
||||
self.encrypt_for_destination(&dest_hex, plaintext)
|
||||
@@ -2389,6 +2390,13 @@ impl LxmdRunner {
|
||||
continue;
|
||||
}
|
||||
};
|
||||
let Some(destination_public_key) = destination_public_key else {
|
||||
tracing::error!(
|
||||
dest = %dest_hex,
|
||||
"opportunistic encryption succeeded without a retained destination identity"
|
||||
);
|
||||
continue;
|
||||
};
|
||||
|
||||
let flags = rns_wire::flags::PacketFlags {
|
||||
header_type: rns_wire::flags::HeaderType::Header1,
|
||||
@@ -2465,6 +2473,8 @@ impl LxmdRunner {
|
||||
.try_send(TransportMessage::RegisterReceipt {
|
||||
truncated_hash: trunc,
|
||||
full_hash: full,
|
||||
destination_hash: dest_hash,
|
||||
destination_public_key,
|
||||
msg_id: hex::encode(hash),
|
||||
timeout: Some(Duration::from_secs(15)),
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user