Add public join policy setting
This commit is contained in:
@@ -27,6 +27,7 @@ type Config struct {
|
||||
} `toml:"info"`
|
||||
|
||||
Policy struct {
|
||||
PublicJoin bool `toml:"public_join"`
|
||||
StripSignatures bool `toml:"strip_signatures"`
|
||||
} `toml:"policy"`
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user