Skip to content

Commit

Permalink
nip34: other fields in repository announcement.
Browse files Browse the repository at this point in the history
  • Loading branch information
fiatjaf committed Apr 24, 2024
1 parent 87390c1 commit ed62361
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions nip34/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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])
}
}

Expand Down

0 comments on commit ed62361

Please sign in to comment.