mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-18 06:44:22 +01:00
always open details for unknown (Other) events.
This commit is contained in:
2
data.go
2
data.go
@@ -245,8 +245,8 @@ func grabData(ctx context.Context, code string, isProfileSitemap bool) (*Data, e
|
||||
data.kind1063Metadata.Summary = (*tag)[1]
|
||||
}
|
||||
default:
|
||||
data.templateId = Other
|
||||
if event.Kind >= 30000 && event.Kind < 40000 {
|
||||
data.templateId = Other
|
||||
if d := event.Tags.GetFirst([]string{"d", ""}); d != nil {
|
||||
data.naddr, _ = nip19.EncodeEntity(event.PubKey, event.Kind, d.Value(), relaysForNip19)
|
||||
data.naddrNaked, _ = nip19.EncodeEntity(event.PubKey, event.Kind, d.Value(), nil)
|
||||
|
||||
@@ -352,6 +352,8 @@ func renderEvent(w http.ResponseWriter, r *http.Request) {
|
||||
IsVideo: data.kind1063Metadata.IsVideo(),
|
||||
})
|
||||
case Other:
|
||||
detailsData.HideDetails = false // always open this since we know nothing else about the event
|
||||
|
||||
err = OtherTemplate.Render(w, &OtherPage{
|
||||
HeadCommonPartial: HeadCommonPartial{
|
||||
IsProfile: false,
|
||||
|
||||
Reference in New Issue
Block a user