mirror of
https://github.com/logos-messaging/libchat.git
synced 2026-03-26 14:13:12 +00:00
compute delivery_address
This commit is contained in:
parent
d173690186
commit
ff34340a70
@ -16,6 +16,12 @@ use crate::inbox::handshake::InboxHandshake;
|
|||||||
use crate::proto::{self};
|
use crate::proto::{self};
|
||||||
use crate::types::{ContentData, PayloadData};
|
use crate::types::{ContentData, PayloadData};
|
||||||
|
|
||||||
|
/// Compute the deterministic Delivery_address for an installation
|
||||||
|
fn delivery_address_for_installation(_: PublicKey) -> String {
|
||||||
|
// TODO: Implement Delivery Address
|
||||||
|
"delivery_address".into()
|
||||||
|
}
|
||||||
|
|
||||||
pub struct Inbox {
|
pub struct Inbox {
|
||||||
ident: Rc<Identity>,
|
ident: Rc<Identity>,
|
||||||
local_convo_id: String,
|
local_convo_id: String,
|
||||||
@ -112,10 +118,11 @@ impl Inbox {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Convert Encrypted Payloads to PayloadData
|
||||||
let payload_data = initial_payloads
|
let payload_data = initial_payloads
|
||||||
.iter()
|
.iter()
|
||||||
.map(|p| PayloadData {
|
.map(|p| PayloadData {
|
||||||
delivery_address: "delivery_address".into(),
|
delivery_address: delivery_address_for_installation(remote_bundle.installation_key),
|
||||||
data: p.encode_to_vec(),
|
data: p.encode_to_vec(),
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user