diff options
| author | Clawd <ai@clawd.bot> | 2026-02-22 14:08:54 -0800 |
|---|---|---|
| committer | Clawd <ai@clawd.bot> | 2026-02-22 14:08:54 -0800 |
| commit | 5195d8031b7930069ba5441a6cd1e7a59c21c546 (patch) | |
| tree | 50a110dd565cc1c9330c61dea6f4cc720e1efbd0 /cmd/relay | |
| parent | 3b760256768e45ddb2965aab2a60f11327972e63 (diff) | |
NIP-11: make relay info configurable
- Add relay config section (name, description, pubkey, contact, icon)
- Wire config to NIP-11 handler
- AuthRequired/RestrictedWrites now reflect actual auth config
- Add NIP-42 to supported_nips list
- Update example config
Diffstat (limited to 'cmd/relay')
| -rw-r--r-- | cmd/relay/main.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/relay/main.go b/cmd/relay/main.go index 86a29cb..78ee469 100644 --- a/cmd/relay/main.go +++ b/cmd/relay/main.go | |||
| @@ -116,6 +116,14 @@ func main() { | |||
| 116 | }() | 116 | }() |
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | wsHandler.SetRelayConfig(&wshandler.RelayInfoConfig{ | ||
| 120 | Name: cfg.Relay.Name, | ||
| 121 | Description: cfg.Relay.Description, | ||
| 122 | Pubkey: cfg.Relay.Pubkey, | ||
| 123 | Contact: cfg.Relay.Contact, | ||
| 124 | Icon: cfg.Relay.Icon, | ||
| 125 | }) | ||
| 126 | |||
| 119 | if cfg.Auth.Read.Enabled || cfg.Auth.Write.Enabled { | 127 | if cfg.Auth.Read.Enabled || cfg.Auth.Write.Enabled { |
| 120 | wsHandler.SetAuth(store) | 128 | wsHandler.SetAuth(store) |
| 121 | wsHandler.SetAuthConfig(&wshandler.AuthConfig{ | 129 | wsHandler.SetAuthConfig(&wshandler.AuthConfig{ |
