From 4a77e0dab6d6d95376112290d778366c029ea740 Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Tue, 3 Mar 2026 09:29:08 -0800 Subject: [PATCH 1/2] Remove nip 86 method config --- README.md | 2 -- zooid/api_test.go | 1 - zooid/config.go | 3 +-- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/README.md b/README.md index 3218186..5d89651 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,6 @@ Configures NIP 29 support. Configures NIP 86 support. - `enabled` - whether NIP 86 is enabled. -- `methods` - a list of [NIP 86](https://github.com/nostr-protocol/nips/blob/master/86.md) relay management methods enabled for this relay. ### `[blossom]` @@ -102,7 +101,6 @@ auto_join = false [management] enabled = true -methods = ["supportedmethods", "banpubkey", "allowpubkey"] [blossom] enabled = false diff --git a/zooid/api_test.go b/zooid/api_test.go index 9cf0d98..b54b3d7 100644 --- a/zooid/api_test.go +++ b/zooid/api_test.go @@ -709,7 +709,6 @@ func TestAPIHandler_ConfigValidation(t *testing.T) { }, "management": map[string]interface{}{ "enabled": true, - "methods": []string{"invite"}, }, "blossom": map[string]interface{}{ "enabled": true, diff --git a/zooid/config.go b/zooid/config.go index 3f96068..99f366b 100644 --- a/zooid/config.go +++ b/zooid/config.go @@ -41,8 +41,7 @@ type Config struct { } `toml:"push" json:"push"` Management struct { - Enabled bool `toml:"enabled" json:"enabled"` - Methods []string `toml:"methods" json:"methods"` + Enabled bool `toml:"enabled" json:"enabled"` } `toml:"management" json:"management"` Blossom struct { From 90b07525af3ca78c19efd4bdecaa8d9113778252 Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Tue, 3 Mar 2026 14:43:03 -0800 Subject: [PATCH 2/2] Remove auto join settings --- README.md | 2 -- zooid/api_test.go | 6 ++---- zooid/config.go | 3 +-- zooid/instance.go | 2 +- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 5d89651..d2d06c4 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,6 @@ Contains policy and access related configuration. Configures NIP 29 support. - `enabled` - whether NIP 29 is enabled. -- `auto_join` - whether relay members can join groups without approval. Defaults to `false`. ### `[management]` @@ -97,7 +96,6 @@ strip_signatures = false [groups] enabled = true -auto_join = false [management] enabled = true diff --git a/zooid/api_test.go b/zooid/api_test.go index b54b3d7..07ab751 100644 --- a/zooid/api_test.go +++ b/zooid/api_test.go @@ -422,8 +422,7 @@ func TestAPIHandler_PatchRelay(t *testing.T) { "strip_signatures": false, }, "groups": map[string]interface{}{ - "enabled": true, - "auto_join": false, + "enabled": true, }, } body, _ := json.Marshal(initialConfig) @@ -701,8 +700,7 @@ func TestAPIHandler_ConfigValidation(t *testing.T) { "strip_signatures": false, }, "groups": map[string]interface{}{ - "enabled": true, - "auto_join": true, + "enabled": true, }, "push": map[string]interface{}{ "enabled": true, diff --git a/zooid/config.go b/zooid/config.go index 99f366b..c020a83 100644 --- a/zooid/config.go +++ b/zooid/config.go @@ -32,8 +32,7 @@ type Config struct { } `toml:"policy" json:"policy"` Groups struct { - Enabled bool `toml:"enabled" json:"enabled"` - AutoJoin bool `toml:"auto_join" json:"auto_join"` + Enabled bool `toml:"enabled" json:"enabled"` } `toml:"groups" json:"groups"` Push struct { diff --git a/zooid/instance.go b/zooid/instance.go index ae9506e..f84c06e 100644 --- a/zooid/instance.go +++ b/zooid/instance.go @@ -380,7 +380,7 @@ func (instance *Instance) OnEvent(ctx context.Context, event nostr.Event) (rejec func (instance *Instance) OnEventSaved(ctx context.Context, event nostr.Event) { h := GetGroupIDFromEvent(event) - if event.Kind == nostr.KindSimpleGroupJoinRequest && instance.Config.Groups.AutoJoin { + if event.Kind == nostr.KindSimpleGroupJoinRequest { instance.Groups.AddMember(h, event.PubKey) instance.Groups.UpdateMembersList(h) }