From 16eb306d1dc112a7c19d6ad2fe1db3ba0ce62200 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Wed, 31 Jan 2024 09:27:54 -0300 Subject: [PATCH] fix primal event links. --- clients.go | 2 +- render_profile.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/clients.go b/clients.go index ee81a17..fa7b505 100644 --- a/clients.go +++ b/clients.go @@ -20,7 +20,7 @@ var ( nosta = ClientReference{ID: "nosta", Name: "Nosta", Base: "https://nosta.me/{code}", Platform: "web"} snort = ClientReference{ID: "snort", Name: "Snort", Base: "https://snort.social/{code}", Platform: "web"} satellite = ClientReference{ID: "satellite", Name: "Satellite", Base: "https://satellite.earth/@{code}", Platform: "web"} - primalWeb = ClientReference{ID: "primal", Name: "Primal", Base: "https://primal.net/p/{code}", Platform: "web"} + 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"} iris = ClientReference{ID: "iris", Name: "Iris", Base: "https://iris.to/{code}", Platform: "web"} diff --git a/render_profile.go b/render_profile.go index 8f2101a..39dbced 100644 --- a/render_profile.go +++ b/render_profile.go @@ -87,7 +87,9 @@ func renderProfile(w http.ResponseWriter, r *http.Request, code string) { s = strings.Replace(s, "/n/", "/u/", 1) } if c == primalWeb { - s = strings.Replace(s, data.nprofile, data.metadata.Npub(), 1) + s = strings.Replace( + strings.Replace(s, "/e/", "/p/", 1), + data.nprofile, data.metadata.Npub(), 1) } return s },