mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-18 06:44:22 +01:00
fix slowness of previous refactors that injected nostr-sdk into this codebase + refactors.
- adjusting many small things related to nostr-sdk usage - fetching profiles in a smarter way - decoupling the logic for rendering profile pages from the `grabData`/`getEvent` flow of other event pages. - incorporating nostr-sdk more holistically, including more hints stuff - improving nostr-sdk itself after some bugs and weird behaviors observed here - set up opentelemetry (should probably remove this later)
This commit is contained in:
2
pages.go
2
pages.go
@@ -167,6 +167,8 @@ func (e *ErrorPageParams) MessageHTML() template.HTML {
|
||||
strings.Contains(e.Errors, "invalid separator"),
|
||||
strings.Contains(e.Errors, "not part of charset"):
|
||||
return "You have typed a wrong event code, we need a URL path that starts with /npub1, /nprofile1, /nevent1, /naddr1, or something like /name@domain.com (or maybe just /domain.com) or an event id as hex (like /aef8b32af...)"
|
||||
case strings.Contains(e.Errors, "profile metadata not found"):
|
||||
return "We couldn't find the metadata (name, picture etc) for the specified user. Please check back here in 6 hours."
|
||||
default:
|
||||
return "I can't give any suggestions to solve the problem.<br> Please tag <a href='/dtonon.com'>daniele</a> and <a href='/fiatjaf.com'>fiatjaf</a> and complain!"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user