Add public join policy setting

This commit is contained in:
Jon Staab
2026-01-08 17:18:52 -08:00
parent 87dd485efc
commit 0fc7208a7a
3 changed files with 7 additions and 0 deletions
+1
View File
@@ -27,6 +27,7 @@ type Config struct {
} `toml:"info"`
Policy struct {
PublicJoin bool `toml:"public_join"`
StripSignatures bool `toml:"strip_signatures"`
} `toml:"policy"`
+4
View File
@@ -289,6 +289,10 @@ func (m *ManagementStore) ValidateJoinRequest(event nostr.Event) (reject bool, e
return true, "invalid: you have been banned from this relay"
}
if m.Config.Policy.PublicJoin {
return false, ""
}
claimTag := event.Tags.Find("claim")
if claimTag == nil {