diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-08-04 08:20:30 +0100 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-08-04 08:20:30 +0100 |
| commit | 6ae42e67d9da36f6c2e1356acba30a3a62112bc7 (patch) | |
| tree | 33c1ba06fc1bf79311a36693754b120ec8c67a33 /src/bin/git_remote_nostr/push.rs | |
| parent | a7cabb96df30cd5d26f63affdb023b0706a387d1 (diff) | |
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.
Diffstat (limited to 'src/bin/git_remote_nostr/push.rs')
| -rw-r--r-- | src/bin/git_remote_nostr/push.rs | 9 |
1 files changed, 4 insertions, 5 deletions
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( | |||
| 1365 | bail!("thread root is not a git patch"); | 1365 | bail!("thread root is not a git patch"); |
| 1366 | } | 1366 | } |
| 1367 | 1367 | ||
| 1368 | if proposal_or_revision | 1368 | if proposal_or_revision.tags.iter().any(|t| { |
| 1369 | .tags | 1369 | t.as_slice().len() > 1 |
| 1370 | .iter() | 1370 | && ["revision-root", "root-revision"].contains(&t.as_slice()[1].as_str()) |
| 1371 | .any(|t| t.as_slice().len() > 1 && t.as_slice()[1].eq("revision-root")) | 1371 | }) { |
| 1372 | { | ||
| 1373 | Ok(( | 1372 | Ok(( |
| 1374 | EventId::parse( | 1373 | EventId::parse( |
| 1375 | &proposal_or_revision | 1374 | &proposal_or_revision |