stop uselessly returning NIPs that are obviously supported on NIP-11 response.

This commit is contained in:
fiatjaf 2023-11-18 08:03:32 -03:00
parent 7a3eb6fb08
commit d2544d0f4d
No known key found for this signature in database
GPG Key ID: BAD43C4BE5C1A3A1

View File

@ -253,7 +253,7 @@ func (rl *Relay) HandleWebsocket(w http.ResponseWriter, r *http.Request) {
func (rl *Relay) HandleNIP11(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/nostr+json")
supportedNIPs := []int{9, 11, 12, 15, 16, 20, 33}
supportedNIPs := []int{}
if rl.ServiceURL != "" {
supportedNIPs = append(supportedNIPs, 42)
}
@ -268,7 +268,7 @@ func (rl *Relay) HandleNIP11(w http.ResponseWriter, r *http.Request) {
Contact: rl.Contact,
Icon: rl.IconURL,
SupportedNIPs: supportedNIPs,
Software: "https://github.com/trailriver/khatru",
Software: "https://github.com/fiatjaf/khatru",
Version: "n/a",
}