From 436ff29135e3deade80a6e53e53d74dddb613481 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Thu, 31 Jul 2025 16:28:04 +0100 Subject: fix: mention marker ~> q tag NIP-10 update required for rust-nostr v0.43 update --- tests/git_remote_nostr/push.rs | 16 +++++++++------- tests/ngit_send.rs | 3 +-- 2 files changed, 10 insertions(+), 9 deletions(-) (limited to 'tests') diff --git a/tests/git_remote_nostr/push.rs b/tests/git_remote_nostr/push.rs index 5912543..a137da5 100644 --- a/tests/git_remote_nostr/push.rs +++ b/tests/git_remote_nostr/push.rs @@ -1070,7 +1070,7 @@ async fn proposal_three_way_merge_commit_pushed_to_main_leads_to_status_event_is merge_status .tags .iter() - .find(|t| t.as_slice().len().eq(&4) && t.as_slice()[3].eq("mention")) + .find(|t| t.as_slice()[0].eq("q")) .unwrap() .as_slice()[1], "status mentions proposal tip event \r\nmerge status:\r\n{}\r\nproposal tip:\r\n{}", @@ -1252,9 +1252,10 @@ async fn proposal_fast_forward_merge_commits_pushed_to_main_leads_to_status_even .collect::>() { assert!( - merge_status.tags.iter().any(|t| t.as_slice().len().eq(&4) - && t.as_slice()[1] == patch_id - && t.as_slice()[3].eq("mention")), + merge_status + .tags + .iter() + .any(|t| t.as_slice()[0].eq("q") && t.as_slice()[1] == patch_id), "merge status doesnt mention proposal patch {patch_id} \r\nmerge status:\r\n{}", merge_status.as_json(), ); @@ -1422,9 +1423,10 @@ async fn proposal_commits_applied_and_pushed_to_main_leads_to_status_event_issue .collect::>() { assert!( - merge_status.tags.iter().any(|t| t.as_slice().len().eq(&4) - && t.as_slice()[1] == patch_id - && t.as_slice()[3].eq("mention")), + merge_status + .tags + .iter() + .any(|t| t.as_slice()[0].eq("q") && t.as_slice()[1] == patch_id), "merge status doesnt mention proposal patch {patch_id} \r\nmerge status:\r\n{}", merge_status.as_json(), ); diff --git a/tests/ngit_send.rs b/tests/ngit_send.rs index 2cd5956..9a46469 100644 --- a/tests/ngit_send.rs +++ b/tests/ngit_send.rs @@ -1759,9 +1759,8 @@ mod in_reply_to_mentions_issue { let cover_letter_event: &nostr::Event = relay.events.iter().find(|e| is_cover_letter(e)).unwrap(); assert!(cover_letter_event.tags.iter().any(|t| { - t.as_slice()[0].eq("e") + t.as_slice()[0].eq("q") && t.as_slice()[1].eq(&get_pretend_issue_event().id.to_hex()) - && t.as_slice()[3].eq(&"mention") })); } Ok(()) -- cgit v1.2.3