diff options
| -rw-r--r-- | Cargo.lock | 19 | ||||
| -rw-r--r-- | Cargo.toml | 4 | ||||
| -rw-r--r-- | src/key_handling/users.rs | 4 | ||||
| -rw-r--r-- | src/sub_commands/prs/create.rs | 8 | ||||
| -rw-r--r-- | test_utils/Cargo.toml | 2 | ||||
| -rw-r--r-- | test_utils/src/relay.rs | 2 |
6 files changed, 23 insertions, 16 deletions
| @@ -1570,6 +1570,12 @@ dependencies = [ | |||
| 1570 | ] | 1570 | ] |
| 1571 | 1571 | ||
| 1572 | [[package]] | 1572 | [[package]] |
| 1573 | name = "negentropy" | ||
| 1574 | version = "0.3.1" | ||
| 1575 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| 1576 | checksum = "e664971378a3987224f7a0e10059782035e89899ae403718ee07de85bec42afe" | ||
| 1577 | |||
| 1578 | [[package]] | ||
| 1573 | name = "ngit" | 1579 | name = "ngit" |
| 1574 | version = "0.0.1" | 1580 | version = "0.0.1" |
| 1575 | dependencies = [ | 1581 | dependencies = [ |
| @@ -1636,9 +1642,9 @@ checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" | |||
| 1636 | 1642 | ||
| 1637 | [[package]] | 1643 | [[package]] |
| 1638 | name = "nostr" | 1644 | name = "nostr" |
| 1639 | version = "0.24.0" | 1645 | version = "0.25.0" |
| 1640 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1646 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 1641 | checksum = "df0af088a37ea0026bf96dcd66db8bf21ed7ff528b7cbe34b7f32f6af3ae14a0" | 1647 | checksum = "1b65a1b93d2c78550f8e7f84ce475b44c4f04e46b08d30be98523eaa498abae4" |
| 1642 | dependencies = [ | 1648 | dependencies = [ |
| 1643 | "aes 0.8.3", | 1649 | "aes 0.8.3", |
| 1644 | "base64", | 1650 | "base64", |
| @@ -1648,6 +1654,7 @@ dependencies = [ | |||
| 1648 | "chacha20", | 1654 | "chacha20", |
| 1649 | "getrandom", | 1655 | "getrandom", |
| 1650 | "instant", | 1656 | "instant", |
| 1657 | "negentropy", | ||
| 1651 | "once_cell", | 1658 | "once_cell", |
| 1652 | "reqwest", | 1659 | "reqwest", |
| 1653 | "serde", | 1660 | "serde", |
| @@ -1658,9 +1665,9 @@ dependencies = [ | |||
| 1658 | 1665 | ||
| 1659 | [[package]] | 1666 | [[package]] |
| 1660 | name = "nostr-sdk" | 1667 | name = "nostr-sdk" |
| 1661 | version = "0.24.0" | 1668 | version = "0.25.0" |
| 1662 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1669 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 1663 | checksum = "5facab78c73baf3853f8c807006e23567dd3825392ef13a3a07122f4ce18b56d" | 1670 | checksum = "f887f45f344828e14740eb37b32c6ae3b6ac5dc7ea94dd60817507c44a770b01" |
| 1664 | dependencies = [ | 1671 | dependencies = [ |
| 1665 | "async-utility", | 1672 | "async-utility", |
| 1666 | "nostr", | 1673 | "nostr", |
| @@ -1673,9 +1680,9 @@ dependencies = [ | |||
| 1673 | 1680 | ||
| 1674 | [[package]] | 1681 | [[package]] |
| 1675 | name = "nostr-sdk-net" | 1682 | name = "nostr-sdk-net" |
| 1676 | version = "0.24.0" | 1683 | version = "0.25.0" |
| 1677 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1684 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 1678 | checksum = "fa4058b0267a1537c25b4674db9ed7a18152fc4c33df246dd4a88701007084ee" | 1685 | checksum = "18d66a499ce2e1ab5ac03626df913d4fe2aa544231ec8b04f312cc13b74d50b2" |
| 1679 | dependencies = [ | 1686 | dependencies = [ |
| 1680 | "futures-util", | 1687 | "futures-util", |
| 1681 | "thiserror", | 1688 | "thiserror", |
| @@ -23,8 +23,8 @@ futures = "0.3.28" | |||
| 23 | git2 = "0.18.1" | 23 | git2 = "0.18.1" |
| 24 | indicatif = "0.17.7" | 24 | indicatif = "0.17.7" |
| 25 | keyring = "2.0.5" | 25 | keyring = "2.0.5" |
| 26 | nostr = "0.24.0" | 26 | nostr = "0.25.0" |
| 27 | nostr-sdk = "0.24.0" | 27 | nostr-sdk = "0.25.0" |
| 28 | passwords = "3.1.13" | 28 | passwords = "3.1.13" |
| 29 | scrypt = "0.11.0" | 29 | scrypt = "0.11.0" |
| 30 | serde = { version = "1.0.181", features = ["derive"] } | 30 | serde = { version = "1.0.181", features = ["derive"] } |
diff --git a/src/key_handling/users.rs b/src/key_handling/users.rs index a486296..75a0a00 100644 --- a/src/key_handling/users.rs +++ b/src/key_handling/users.rs | |||
| @@ -190,11 +190,11 @@ impl UserManagement for UserManager { | |||
| 190 | relays_to_search, | 190 | relays_to_search, |
| 191 | vec![ | 191 | vec![ |
| 192 | nostr::Filter::default() | 192 | nostr::Filter::default() |
| 193 | .author(public_key.to_string()) | 193 | .author(*public_key) |
| 194 | .since(nostr::Timestamp::from(user_ref.metadata.created_at + 1)) | 194 | .since(nostr::Timestamp::from(user_ref.metadata.created_at + 1)) |
| 195 | .kind(Kind::Metadata), | 195 | .kind(Kind::Metadata), |
| 196 | nostr::Filter::default() | 196 | nostr::Filter::default() |
| 197 | .author(public_key.to_string()) | 197 | .author(*public_key) |
| 198 | .since(nostr::Timestamp::from(user_ref.relays.created_at + 1)) | 198 | .since(nostr::Timestamp::from(user_ref.relays.created_at + 1)) |
| 199 | .kind(Kind::RelayList), | 199 | .kind(Kind::RelayList), |
| 200 | ], | 200 | ], |
diff --git a/src/sub_commands/prs/create.rs b/src/sub_commands/prs/create.rs index 0249488..5986235 100644 --- a/src/sub_commands/prs/create.rs +++ b/src/sub_commands/prs/create.rs | |||
| @@ -90,7 +90,7 @@ pub async fn launch( | |||
| 90 | let keys = login::launch(&cli_args.nsec, &cli_args.password, None).await?; | 90 | let keys = login::launch(&cli_args.nsec, &cli_args.password, None).await?; |
| 91 | 91 | ||
| 92 | let events = | 92 | let events = |
| 93 | generate_pr_and_patch_events(&title, &description, &to_branch, &git_repo, &ahead, keys)?; | 93 | generate_pr_and_patch_events(&title, &description, &to_branch, &git_repo, &ahead, &keys)?; |
| 94 | 94 | ||
| 95 | let my_write_relays: Vec<String> = vec![ | 95 | let my_write_relays: Vec<String> = vec![ |
| 96 | "ws://localhost:8051".to_string(), | 96 | "ws://localhost:8051".to_string(), |
| @@ -318,7 +318,7 @@ fn generate_pr_and_patch_events( | |||
| 318 | to_branch: &str, | 318 | to_branch: &str, |
| 319 | git_repo: &Repo, | 319 | git_repo: &Repo, |
| 320 | commits: &Vec<Sha1Hash>, | 320 | commits: &Vec<Sha1Hash>, |
| 321 | keys: nostr::Keys, | 321 | keys: &nostr::Keys, |
| 322 | ) -> Result<Vec<nostr::Event>> { | 322 | ) -> Result<Vec<nostr::Event>> { |
| 323 | let root_commit = git_repo | 323 | let root_commit = git_repo |
| 324 | .get_root_commit(to_branch) | 324 | .get_root_commit(to_branch) |
| @@ -337,7 +337,7 @@ fn generate_pr_and_patch_events( | |||
| 337 | // TODO: people tag maintainers | 337 | // TODO: people tag maintainers |
| 338 | // TODO: add relay tags | 338 | // TODO: add relay tags |
| 339 | ) | 339 | ) |
| 340 | .to_event(&keys) | 340 | .to_event(keys) |
| 341 | .context("failed to create pr event")?; | 341 | .context("failed to create pr event")?; |
| 342 | 342 | ||
| 343 | let pr_event_id = pr_event.id; | 343 | let pr_event_id = pr_event.id; |
| @@ -375,7 +375,7 @@ fn generate_pr_and_patch_events( | |||
| 375 | // TODO: add relay tags | 375 | // TODO: add relay tags |
| 376 | ], | 376 | ], |
| 377 | ) | 377 | ) |
| 378 | .to_event(&keys)?, | 378 | .to_event(keys)?, |
| 379 | ); | 379 | ); |
| 380 | } | 380 | } |
| 381 | Ok(events) | 381 | Ok(events) |
diff --git a/test_utils/Cargo.toml b/test_utils/Cargo.toml index 7901b13..944f6df 100644 --- a/test_utils/Cargo.toml +++ b/test_utils/Cargo.toml | |||
| @@ -9,7 +9,7 @@ assert_cmd = "2.0.12" | |||
| 9 | dialoguer = "0.10.4" | 9 | dialoguer = "0.10.4" |
| 10 | directories = "5.0.1" | 10 | directories = "5.0.1" |
| 11 | git2 = "0.18.1" | 11 | git2 = "0.18.1" |
| 12 | nostr = "0.24.0" | 12 | nostr = "0.25.0" |
| 13 | once_cell = "1.18.0" | 13 | once_cell = "1.18.0" |
| 14 | rand = "0.8" | 14 | rand = "0.8" |
| 15 | rexpect = { git = "https://github.com/phaer/rexpect.git", branch= "skip-ansi-escape-codes" } | 15 | rexpect = { git = "https://github.com/phaer/rexpect.git", branch= "skip-ansi-escape-codes" } |
diff --git a/test_utils/src/relay.rs b/test_utils/src/relay.rs index db6a96c..87eb081 100644 --- a/test_utils/src/relay.rs +++ b/test_utils/src/relay.rs | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | use std::collections::HashMap; | 1 | use std::collections::HashMap; |
| 2 | 2 | ||
| 3 | use anyhow::{bail, Result}; | 3 | use anyhow::{bail, Result}; |
| 4 | use nostr::{ClientMessage, RelayMessage}; | 4 | use nostr::{ClientMessage, JsonUtil, RelayMessage}; |
| 5 | 5 | ||
| 6 | use crate::CliTester; | 6 | use crate::CliTester; |
| 7 | 7 | ||