add jumble.

This commit is contained in:
fiatjaf
2024-12-18 08:06:31 -03:00
committed by dtonon
parent 5a0bd692e6
commit 644bc48947
2 changed files with 4 additions and 9 deletions

View File

@@ -22,7 +22,8 @@ var (
primalWeb = ClientReference{ID: "primal", Name: "Primal", Base: "https://primal.net/e/{code}", Platform: "web"}
nostrudel = ClientReference{ID: "nostrudel", Name: "Nostrudel", Base: "https://nostrudel.ninja/#/n/{code}", Platform: "web"}
nostter = ClientReference{ID: "nostter", Name: "Nostter", Base: "https://nostter.app/{code}", Platform: "web"}
nostterRelay = ClientReference{ID: "nostter", Name: "Nostter", Base: "https://nostter.app/relays/{code}", Platform: "web"}
nostterRelay = ClientReference{ID: "nostter", Name: "Nostter", Base: "https://nostter.app/relays/wss%3A%2F%2F{code}", Platform: "web"}
jumble = ClientReference{ID: "jumble", Name: "Jumble", Base: "https://jumble.social/?r=wss://{code}", Platform: "web"}
coracle = ClientReference{ID: "coracle", Name: "Coracle", Base: "https://coracle.social/{code}", Platform: "web"}
coracleRelay = ClientReference{ID: "coracle", Name: "Coracle", Base: "https://coracle.social/relays/{code}", Platform: "web"}
@@ -63,7 +64,7 @@ func generateClientList(
case -1: // relays
clients = []ClientReference{
native,
nostterRelay, coracleRelay, nostrrrRelay,
jumble, nostterRelay, nostrrrRelay, coracleRelay,
}
case 1, 6:
clients = []ClientReference{

View File

@@ -2,7 +2,6 @@ package main
import (
"net/http"
"net/url"
"strings"
"time"
@@ -98,12 +97,7 @@ func renderRelayPage(w http.ResponseWriter, r *http.Request) {
Proxy: "https://" + hostname + "/njump/proxy?src=",
LastNotes: renderableLastNotes,
ModifiedAt: lastEventAt.Format("2006-01-02T15:04:05Z07:00"),
Clients: generateClientList(-1, hostname, func(cr ClientReference, s string) string {
if cr == nostterRelay {
return strings.Replace(s, hostname, url.PathEscape("wss://"+hostname), 1)
}
return s
}),
Clients: generateClientList(-1, hostname),
}).Render(r.Context(), w)
}
}