mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-09-17 19:13:56 +02:00
nip29: oh, right, group addresses.
This commit is contained in:
@@ -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{
|
||||
|
Reference in New Issue
Block a user