[client] F24: block and unblock as staged rotates, receipts with seq, readdress; payloads in PROTOCOL.md
ci / check (pull_request) Has been cancelled

This commit is contained in:
2026-11-17 12:01:32 +01:00
parent 0e6be38280
commit cfabc97d20
9 changed files with 652 additions and 57 deletions
+16
View File
@@ -98,6 +98,20 @@ impl Transport for Http {
self.call("DELETE", &path, Some(fetch), &[], false)
.map(|_| ())
}
fn rotate_post_token(
&self,
id: &MailboxId,
fetch: &Token,
new_hash: &Sha256Hash,
) -> Result<(), TransportError> {
let body = serde_json::to_vec(&RotatePostToken {
post_token_hash: *new_hash,
})
.map_err(|_| TransportError::Failed)?;
let path = format!("/v0/mailboxes/{}/post-token", id.to_wire());
self.call("PUT", &path, Some(fetch), &body, true)
.map(|_| ())
}
fn create_invite(&self, req: &CreateInvite) -> Result<(), TransportError> {
let body = serde_json::to_vec(req).map_err(|_| TransportError::Failed)?;
self.call("POST", "/v0/invites", None, &body, true)
@@ -152,6 +166,8 @@ fn pair_and_talk_through_a_real_relay_which_never_sees_a_name_or_a_word() {
let mut eva = Client::new("Eva Nováková", relay.clone()).expect("eva");
let mut jan = Client::new("Jan Dvořák", relay.clone()).expect("jan");
eva.set_receipts(false);
jan.set_receipts(false);
let invite = eva.create_invite().expect("invite");
// While the invite waits, the relay holds Eva's KeyPackage: it must not carry her name.
let invited = std::fs::read(&db).expect("db");