From ed62361f1bd8900067e1e4dd7353ceb15550db7d Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Wed, 24 Apr 2024 18:59:08 -0300 Subject: [PATCH] nip34: other fields in repository announcement. --- nip34/repository.go | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/nip34/repository.go b/nip34/repository.go index 9be9fb4..ebd645c 100644 --- a/nip34/repository.go +++ b/nip34/repository.go @@ -10,12 +10,14 @@ import ( type Repository struct { nostr.Event - ID string - Name string - Description string - Web []string - Clone []string - Relays []string + ID string + Name string + Description string + Web []string + Clone []string + Relays []string + EarliestUniqueCommitID string + Maintainers []string } func ParseRepository(event nostr.Event) Repository { @@ -40,6 +42,10 @@ func ParseRepository(event nostr.Event) Repository { repo.Clone = append(repo.Clone, tag[1:]...) case "relays": repo.Relays = append(repo.Relays, tag[1:]...) + case "r": + repo.EarliestUniqueCommitID = tag[1] + case "maintainers": + repo.Maintainers = append(repo.Maintainers, tag[1]) } }