mirror of
https://github.com/logos-messaging/libchat.git
synced 2026-04-27 22:03:07 +00:00
Add DH decryption for Inbox
This commit is contained in:
parent
99f50220f2
commit
a1008ec969
@ -140,10 +140,16 @@ impl Inbox {
|
|||||||
|
|
||||||
match frame.frame_type.unwrap() {
|
match frame.frame_type.unwrap() {
|
||||||
proto::inbox_v1_frame::FrameType::InvitePrivateV1(_invite_private_v1) => {
|
proto::inbox_v1_frame::FrameType::InvitePrivateV1(_invite_private_v1) => {
|
||||||
let convo = PrivateV1Convo::new_responder(seed_key, ephemeral_key.clone().into());
|
let mut convo =
|
||||||
|
PrivateV1Convo::new_responder(seed_key, ephemeral_key.clone().into());
|
||||||
|
|
||||||
// TODO: Update PrivateV1 Constructor with DR, initial_message
|
let Some(enc_payload) = _invite_private_v1.initial_message else {
|
||||||
Ok((Box::new(convo), None))
|
return Err(ChatError::Protocol("Invite: missing initial".into()));
|
||||||
|
};
|
||||||
|
|
||||||
|
let content = convo.handle_frame(enc_payload)?;
|
||||||
|
|
||||||
|
Ok((Box::new(convo), content))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user