feat: dial hints on the account-bound operations for self-resolving hosts
This commit is contained in:
parent
5559fcce31
commit
28f13641a3
3 changed files with 45 additions and 23 deletions
|
|
@ -340,7 +340,7 @@ fn restore(key: &PathBuf, store: &Store, address: &str, timeout: u64) -> Result<
|
|||
|
||||
fn rotate(key: &PathBuf, store: &Store, timeout: u64) -> Result<()> {
|
||||
let account = load_account(key, store)?;
|
||||
let rotated = client::rotate(store, &account, timeout)?;
|
||||
let rotated = client::rotate(store, &account, None, timeout)?;
|
||||
let addr = store.account()?.expect("rotate checked for an account");
|
||||
println!("rotated {}", addr.short());
|
||||
println!("new key: {}", b32(&rotated.new_pk));
|
||||
|
|
@ -509,7 +509,7 @@ fn accept(key: &PathBuf, store: &Store, address: &str, timeout: u64) -> Result<(
|
|||
}
|
||||
store.accept(&address, &identity)?;
|
||||
println!("accepted {address}; its token travels in your next message to them");
|
||||
match client::push_tokens(store, &account, timeout)? {
|
||||
match client::push_tokens(store, &account, None, timeout)? {
|
||||
Pushed::NotRegistered => {
|
||||
warn("not registered; the set will be pushed with your first fetch")
|
||||
}
|
||||
|
|
@ -525,7 +525,7 @@ fn block(key: &PathBuf, store: &Store, address: &str, timeout: u64) -> Result<()
|
|||
return Err(anyhow!(format!("{address} was never accepted")));
|
||||
}
|
||||
println!("blocked {address}; their mail lands in requests from their next message on");
|
||||
match client::push_tokens(store, &account, timeout)? {
|
||||
match client::push_tokens(store, &account, None, timeout)? {
|
||||
Pushed::NotRegistered => {
|
||||
warn("not registered; the set will be pushed with your first fetch")
|
||||
}
|
||||
|
|
@ -711,7 +711,7 @@ fn resolve_id_prefixes(store: &Store, ids: &[String]) -> Result<Vec<[u8; ID_LEN]
|
|||
fn delete(key: &PathBuf, store: &Store, ids: &[String], timeout: u64) -> Result<()> {
|
||||
let account = load_account(key, store)?;
|
||||
let full = resolve_id_prefixes(store, ids)?;
|
||||
let removed = client::delete(store, &account, &full, timeout)?;
|
||||
let removed = client::delete(store, &account, &full, None, timeout)?;
|
||||
println!("removed {removed} message(s) from the server");
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue