mirror of
https://github.com/logos-messaging/libchat.git
synced 2026-02-10 17:03: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::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 {
|
||||
ident: Rc<Identity>,
|
||||
local_convo_id: String,
|
||||
@ -112,10 +118,11 @@ impl Inbox {
|
||||
};
|
||||
}
|
||||
|
||||
// Convert Encrypted Payloads to PayloadData
|
||||
let payload_data = initial_payloads
|
||||
.iter()
|
||||
.map(|p| PayloadData {
|
||||
delivery_address: "delivery_address".into(),
|
||||
delivery_address: delivery_address_for_installation(remote_bundle.installation_key),
|
||||
data: p.encode_to_vec(),
|
||||
})
|
||||
.collect();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user