diff --git a/zooid/groups.go b/zooid/groups.go index 65b1012..12525f5 100644 --- a/zooid/groups.go +++ b/zooid/groups.go @@ -2,6 +2,7 @@ package zooid import ( "fiatjaf.com/nostr" + "fiatjaf.com/nostr/nip29" ) // Utils @@ -66,6 +67,7 @@ func (g *GroupStore) SetMetadataFromEvent(event nostr.Event) error { func (g *GroupStore) DeleteGroup(h string) { filters := []nostr.Filter{ { + Kinds: nip29.MetadataEventKinds, Tags: nostr.TagMap{ "d": []string{h}, }, @@ -79,7 +81,9 @@ func (g *GroupStore) DeleteGroup(h string) { for _, filter := range filters { for event := range g.Events.QueryEvents(filter, 0) { - g.Events.DeleteEvent(event.ID) + if event.Kind != nostr.KindSimpleGroupDeleteEvent { + g.Events.DeleteEvent(event.ID) + } } } } diff --git a/zooid/instance.go b/zooid/instance.go index 43dcf33..2b44aa1 100644 --- a/zooid/instance.go +++ b/zooid/instance.go @@ -66,14 +66,15 @@ func MakeInstance(filename string) (*Instance, error) { // NIP 11 info + // self := config.GetSelf() owner := config.GetOwner() instance.Relay.Negentropy = true instance.Relay.Info.Name = config.Info.Name instance.Relay.Info.Icon = config.Info.Icon + // instance.Relay.Info.Self = &self instance.Relay.Info.PubKey = &owner instance.Relay.Info.Description = config.Info.Description - // instance.Relay.Info.Self = nostr.GetPublicKey(secret) instance.Relay.Info.Software = "https://github.com/coracle-social/zooid" instance.Relay.Info.Version = "v0.1.0"