upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/git
diff options
context:
space:
mode:
Diffstat (limited to 'src/git')
-rw-r--r--src/git/authorization.rs13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/git/authorization.rs b/src/git/authorization.rs
index 06672c8..2fe81b0 100644
--- a/src/git/authorization.rs
+++ b/src/git/authorization.rs
@@ -444,11 +444,16 @@ mod tests {
444 ) -> Event { 444 ) -> Event {
445 let mut tags = vec![Tag::custom(TagKind::d(), vec![identifier.to_string()])]; 445 let mut tags = vec![Tag::custom(TagKind::d(), vec![identifier.to_string()])];
446 446
447 // Add maintainers as p tags 447 // Add maintainers as a single "maintainers" tag per NIP-34
448 for maintainer_keys in maintainers { 448 // Format: ["maintainers", "<pubkey1-hex>", "<pubkey2-hex>", ...]
449 if !maintainers.is_empty() {
450 let maintainer_pubkeys: Vec<String> = maintainers
451 .iter()
452 .map(|k| k.public_key().to_hex())
453 .collect();
449 tags.push(Tag::custom( 454 tags.push(Tag::custom(
450 TagKind::p(), 455 TagKind::Custom("maintainers".into()),
451 vec![maintainer_keys.public_key().to_hex()], 456 maintainer_pubkeys,
452 )); 457 ));
453 } 458 }
454 459