From 29a093993ce7d0210ac39ceb1a25acc9350492e7 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Fri, 19 Jul 2024 22:10:23 +0100 Subject: feat: save created events to cache as soon as they are successfully sent to at least one relay --- src/sub_commands/init.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/sub_commands/init.rs') diff --git a/src/sub_commands/init.rs b/src/sub_commands/init.rs index 44e288f..e46bf74 100644 --- a/src/sub_commands/init.rs +++ b/src/sub_commands/init.rs @@ -52,6 +52,7 @@ pub struct SubCommandArgs { #[allow(clippy::too_many_lines)] pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { let git_repo = Repo::discover().context("cannot find a git repository")?; + let git_repo_path = git_repo.get_path()?; let root_commit = git_repo .get_root_commit() @@ -313,6 +314,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { send_events( &client, + git_repo_path, vec![repo_event], user_ref.relays.write(), relays.clone(), -- cgit v1.2.3