mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-03-26 17:52:20 +01:00
nip34: other fields in repository announcement.
This commit is contained in:
parent
87390c11ac
commit
ed62361f1b
@ -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])
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user