Fix rendering of naddr and other events

This commit is contained in:
Daniele Tonon
2023-06-01 16:43:47 +02:00
parent 3b6b347337
commit 64b2ce3e02
6 changed files with 31 additions and 25 deletions

View File

@@ -111,6 +111,9 @@ func render(w http.ResponseWriter, r *http.Request) {
}
kindDescription := kindNames[event.Kind]
if kindDescription == "" {
kindDescription = fmt.Sprintf("Kind %d", event.Kind)
}
kindNIP := kindNIPS[event.Kind]
imageMatch := regexp.MustCompile(`https:\/\/[^ ]*\.(gif|jpe?g|png|webp)`).FindStringSubmatch(event.Content)