upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/nostr/events.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/nostr/events.rs')
-rw-r--r--src/nostr/events.rs10
1 files changed, 6 insertions, 4 deletions
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 {
495 vec![identifier.to_string()], 495 vec![identifier.to_string()],
496 )]; 496 )];
497 497
498 for url in clone_urls { 498 // NIP-34: Single clone tag with multiple values
499 if !clone_urls.is_empty() {
499 tags.push(Tag::custom( 500 tags.push(Tag::custom(
500 nostr_sdk::TagKind::Clone, 501 nostr_sdk::TagKind::Clone,
501 vec![url.to_string()], 502 clone_urls.iter().map(|s| s.to_string()),
502 )); 503 ));
503 } 504 }
504 505
505 for relay in relays { 506 // NIP-34: Single relays tag with multiple values
507 if !relays.is_empty() {
506 tags.push(Tag::custom( 508 tags.push(Tag::custom(
507 nostr_sdk::TagKind::Relays, 509 nostr_sdk::TagKind::Relays,
508 vec![relay.to_string()], 510 relays.iter().map(|s| s.to_string()),
509 )); 511 ));
510 } 512 }
511 513