Add timezones to CalendarEvent

This commit is contained in:
dtonon 2024-05-14 17:46:25 +02:00 committed by fiatjaf_
parent 96dfeac1bd
commit a5767c9b5a

View File

@ -25,6 +25,8 @@ type CalendarEvent struct {
Participants []Participant
References []string
Hashtags []string
StartTzid string
EndTzid string
}
type Participant struct {
@ -91,6 +93,10 @@ func ParseCalendarEvent(event nostr.Event) CalendarEvent {
calev.References = append(calev.References, tag[1])
case "t":
calev.Hashtags = append(calev.Hashtags, tag[1])
case "start_tzid":
calev.StartTzid = tag[1]
case "end_tzid":
calev.EndTzid = tag[1]
}
}
return calev