fix: check tag length on enhanced event.

This commit is contained in:
fiatjaf
2024-08-21 09:25:10 -03:00
parent 268a615cd9
commit ba3bd2d0fa

View File

@@ -32,6 +32,10 @@ func NewEnhancedEvent(
ee := EnhancedEvent{Event: event}
for _, tag := range event.Tags {
if len(tag) < 2 {
continue
}
if tag[0] == "subject" || tag[0] == "title" {
ee.subject = tag[1]
}