upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/bin/ngit/sub_commands/send.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/ngit/sub_commands/send.rs')
-rw-r--r--src/bin/ngit/sub_commands/send.rs17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/bin/ngit/sub_commands/send.rs b/src/bin/ngit/sub_commands/send.rs
index c6c75c9..7c898bc 100644
--- a/src/bin/ngit/sub_commands/send.rs
+++ b/src/bin/ngit/sub_commands/send.rs
@@ -1,23 +1,23 @@
1use std::path::Path; 1use std::path::Path;
2 2
3use anyhow::{bail, Context, Result}; 3use anyhow::{Context, Result, bail};
4use console::Style; 4use console::Style;
5use ngit::{client::send_events, git_events::generate_cover_letter_and_patch_events}; 5use ngit::{client::send_events, git_events::generate_cover_letter_and_patch_events};
6use nostr::{ 6use nostr::{
7 nips::{nip10::Marker, nip19::Nip19Event},
8 ToBech32, 7 ToBech32,
8 nips::{nip10::Marker, nip19::Nip19Event},
9}; 9};
10use nostr_sdk::hashes::sha1::Hash as Sha1Hash; 10use nostr_sdk::hashes::sha1::Hash as Sha1Hash;
11 11
12use crate::{ 12use crate::{
13 cli::{extract_signer_cli_arguments, Cli}, 13 cli::{Cli, extract_signer_cli_arguments},
14 cli_interactor::{ 14 cli_interactor::{
15 Interactor, InteractorPrompt, PromptConfirmParms, PromptInputParms, PromptMultiChoiceParms, 15 Interactor, InteractorPrompt, PromptConfirmParms, PromptInputParms, PromptMultiChoiceParms,
16 }, 16 },
17 client::{ 17 client::{
18 fetching_with_report, get_events_from_local_cache, get_repo_ref_from_cache, Client, Connect, 18 Client, Connect, fetching_with_report, get_events_from_local_cache, get_repo_ref_from_cache,
19 }, 19 },
20 git::{identify_ahead_behind, Repo, RepoActions}, 20 git::{Repo, RepoActions, identify_ahead_behind},
21 git_events::{event_is_patch_set_root, event_tag_from_nip19_or_hex}, 21 git_events::{event_is_patch_set_root, event_tag_from_nip19_or_hex},
22 login, 22 login,
23 repo_ref::get_repo_coordinates_when_remote_unknown, 23 repo_ref::get_repo_coordinates_when_remote_unknown,
@@ -369,10 +369,9 @@ async fn get_root_proposal_id_and_mentions_from_in_reply_to(
369 public_key: _, 369 public_key: _,
370 uppercase: false, 370 uppercase: false,
371 }) => { 371 }) => {
372 let events = get_events_from_local_cache( 372 let events = get_events_from_local_cache(git_repo_path, vec![
373 git_repo_path, 373 nostr::Filter::new().id(*event_id),
374 vec![nostr::Filter::new().id(*event_id)], 374 ])
375 )
376 .await?; 375 .await?;
377 376
378 if let Some(first) = events.iter().find(|e| e.id.eq(event_id)) { 377 if let Some(first) = events.iter().find(|e| e.id.eq(event_id)) {