always open details for unknown (Other) events.

This commit is contained in:
fiatjaf
2023-11-05 07:58:19 -03:00
parent 227f6a88ec
commit 2cacdc84e7
2 changed files with 3 additions and 1 deletions

View File

@@ -245,8 +245,8 @@ func grabData(ctx context.Context, code string, isProfileSitemap bool) (*Data, e
data.kind1063Metadata.Summary = (*tag)[1]
}
default:
if event.Kind >= 30000 && event.Kind < 40000 {
data.templateId = Other
if event.Kind >= 30000 && event.Kind < 40000 {
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)

View File

@@ -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,