Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement PNI #245

Merged
merged 12 commits into from
May 30, 2024
22 changes: 6 additions & 16 deletions presage-cli/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use core::fmt;
use std::convert::TryInto;
use std::path::Path;
use std::path::PathBuf;
Expand Down Expand Up @@ -492,7 +491,12 @@ async fn run<S: Store>(subcommand: Cmd, config_store: S) -> anyhow::Result<()> {
let stdin = io::stdin();
let reader = BufReader::new(stdin);
if let Some(confirmation_code) = reader.lines().next_line().await? {
manager.confirm_verification_code(confirmation_code).await?;
let registered_manager =
manager.confirm_verification_code(confirmation_code).await?;
println!(
"Account identifier: {}",
registered_manager.registration_data().aci()
);
}
}
Cmd::LinkDevice {
Expand Down Expand Up @@ -709,17 +713,3 @@ fn parse_base64_profile_key(s: &str) -> anyhow::Result<ProfileKey> {
.map_err(|_| anyhow!("profile key of invalid length"))?;
Ok(ProfileKey::create(bytes))
}

struct DebugGroup<'a>(&'a Group);

impl fmt::Debug for DebugGroup<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let group = &self.0;
f.debug_struct("Group")
.field("title", &group.title)
.field("avatar", &group.avatar)
.field("revision", &group.revision)
.field("description", &group.description)
.finish()
}
}
1 change: 1 addition & 0 deletions presage-store-sled/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ thiserror = "1.0"
prost = "> 0.10, <= 0.12"
sha2 = "0.10"
quickcheck_macros = "1.0.0"
chrono = "0.4.35"

[dev-dependencies]
anyhow = "1.0"
Expand Down
Loading