From 6ae42e67d9da36f6c2e1356acba30a3a62112bc7 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Mon, 4 Aug 2025 08:20:30 +0100 Subject: fix: `t` tag `revision-root` ~> `root-revision` NIP-34 specifies patch revisions should have a `t` tag of `root-revision` whereas we have been using `revision-root`. this fixes it and and handles events created with the incorrect tag. --- src/bin/git_remote_nostr/push.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/bin/git_remote_nostr/push.rs') diff --git a/src/bin/git_remote_nostr/push.rs b/src/bin/git_remote_nostr/push.rs index 9ba7c30..d0cf923 100644 --- a/src/bin/git_remote_nostr/push.rs +++ b/src/bin/git_remote_nostr/push.rs @@ -1365,11 +1365,10 @@ async fn get_proposal_and_revision_root_from_patch( bail!("thread root is not a git patch"); } - if proposal_or_revision - .tags - .iter() - .any(|t| t.as_slice().len() > 1 && t.as_slice()[1].eq("revision-root")) - { + if proposal_or_revision.tags.iter().any(|t| { + t.as_slice().len() > 1 + && ["revision-root", "root-revision"].contains(&t.as_slice()[1].as_str()) + }) { Ok(( EventId::parse( &proposal_or_revision -- cgit v1.2.3