link to nprofile on clients instead of npub.

This commit is contained in:
fiatjaf
2024-01-16 09:45:12 -03:00
parent 59a46c2f5a
commit 6f720274e7

View File

@@ -81,11 +81,14 @@ func renderProfile(w http.ResponseWriter, r *http.Request, code string) {
Nprofile: data.nprofile,
AuthorRelays: data.authorRelays,
LastNotes: data.renderableLastNotes,
Clients: generateClientList(data.event.Kind, data.metadata.Npub(),
Clients: generateClientList(data.event.Kind, data.nprofile,
func(c ClientReference, s string) string {
if c == nostrudel {
s = strings.Replace(s, "/n/", "/u/", 1)
}
if c == primalWeb {
s = strings.Replace(s, data.nprofile, data.metadata.Npub(), 1)
}
return s
},
),