From 780d09b0c1eb823f02fc61de6dbf99b2d5cefaca Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Wed, 21 Jan 2026 11:39:33 +0000 Subject: fix: create_announcement_event test helper uses correct NIP-34 tag format NIP-34 specifies single clone/relays tags with multiple values, not multiple tags with single values. Update test helper to match spec. --- src/nostr/events.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/nostr/events.rs b/src/nostr/events.rs index 39014da..1d5a50f 100644 --- a/src/nostr/events.rs +++ b/src/nostr/events.rs @@ -495,17 +495,19 @@ mod tests { vec![identifier.to_string()], )]; - for url in clone_urls { + // NIP-34: Single clone tag with multiple values + if !clone_urls.is_empty() { tags.push(Tag::custom( nostr_sdk::TagKind::Clone, - vec![url.to_string()], + clone_urls.iter().map(|s| s.to_string()), )); } - for relay in relays { + // NIP-34: Single relays tag with multiple values + if !relays.is_empty() { tags.push(Tag::custom( nostr_sdk::TagKind::Relays, - vec![relay.to_string()], + relays.iter().map(|s| s.to_string()), )); } -- cgit v1.2.3