diff options
Diffstat (limited to 'src/bin/ngit/sub_commands/init.rs')
| -rw-r--r-- | src/bin/ngit/sub_commands/init.rs | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/bin/ngit/sub_commands/init.rs b/src/bin/ngit/sub_commands/init.rs index 4aa7ced..3731e3a 100644 --- a/src/bin/ngit/sub_commands/init.rs +++ b/src/bin/ngit/sub_commands/init.rs | |||
| @@ -11,6 +11,7 @@ use nostr::{ | |||
| 11 | nips::{ | 11 | nips::{ |
| 12 | nip01::Coordinate, | 12 | nip01::Coordinate, |
| 13 | nip05::{self}, | 13 | nip05::{self}, |
| 14 | nip19::Nip19Coordinate, | ||
| 14 | }, | 15 | }, |
| 15 | }; | 16 | }; |
| 16 | use nostr_sdk::{Kind, RelayUrl}; | 17 | use nostr_sdk::{Kind, RelayUrl}; |
| @@ -437,10 +438,12 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { | |||
| 437 | // TODO - does this git config item do more harm than good? | 438 | // TODO - does this git config item do more harm than good? |
| 438 | git_repo.save_git_config_item( | 439 | git_repo.save_git_config_item( |
| 439 | "nostr.repo", | 440 | "nostr.repo", |
| 440 | &Coordinate { | 441 | &Nip19Coordinate { |
| 441 | kind: Kind::GitRepoAnnouncement, | 442 | coordinate: Coordinate { |
| 442 | public_key: user_ref.public_key, | 443 | kind: Kind::GitRepoAnnouncement, |
| 443 | identifier: identifier.clone(), | 444 | public_key: user_ref.public_key, |
| 445 | identifier: identifier.clone(), | ||
| 446 | }, | ||
| 444 | relays: vec![], | 447 | relays: vec![], |
| 445 | } | 448 | } |
| 446 | .to_bech32()?, | 449 | .to_bech32()?, |
| @@ -471,10 +474,12 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { | |||
| 471 | repo_ref.set_nostr_git_url(NostrUrlDecoded { | 474 | repo_ref.set_nostr_git_url(NostrUrlDecoded { |
| 472 | original_string: String::new(), | 475 | original_string: String::new(), |
| 473 | nip05: Some(nip05.clone()), | 476 | nip05: Some(nip05.clone()), |
| 474 | coordinate: Coordinate { | 477 | coordinate: Nip19Coordinate { |
| 475 | kind: Kind::GitRepoAnnouncement, | 478 | coordinate: Coordinate { |
| 476 | public_key: user_ref.public_key, | 479 | kind: Kind::GitRepoAnnouncement, |
| 477 | identifier: repo_ref.identifier.clone(), | 480 | public_key: user_ref.public_key, |
| 481 | identifier: repo_ref.identifier.clone(), | ||
| 482 | }, | ||
| 478 | relays: if inter.next().is_some() || relays.is_empty() { | 483 | relays: if inter.next().is_some() || relays.is_empty() { |
| 479 | vec![] | 484 | vec![] |
| 480 | } else { | 485 | } else { |