nip29: oh, right, group addresses.

This commit is contained in:
fiatjaf
2024-05-10 18:03:24 -03:00
parent 705d035281
commit 96dfeac1bd
2 changed files with 7 additions and 6 deletions

View File

@@ -45,10 +45,11 @@ type Group struct {
LastMembersUpdate nostr.Timestamp
}
func NewGroup(id string) (Group, error) {
gad, err := ParseGroupAddress(id)
// NewGroup takes a group address in the form "<id>'<relay-hostname>"
func NewGroup(gadstr string) (Group, error) {
gad, err := ParseGroupAddress(gadstr)
if err != nil {
return Group{}, fmt.Errorf("invalid group id '%s': %w", id, err)
return Group{}, fmt.Errorf("invalid group id '%s': %w", gadstr, err)
}
return Group{