Skip to content

Commit 72ee8b8

Browse files
committed
Revert "chore: add rsvp field in attendee"
1 parent f03f167 commit 72ee8b8

File tree

3 files changed

+1
-28
lines changed

3 files changed

+1
-28
lines changed

generator.go

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,6 @@ func Generate(prodId string, events ...*Event) (string, error) {
2020
return "", err
2121
}
2222
for _, event := range events {
23-
attendees := make([]Attendee, 0, len(event.Attendees))
24-
for _, att := range event.Attendees {
25-
if att.Rsvp == "" {
26-
att.Rsvp = Rsvp_False
27-
attendees = append(attendees, att)
28-
}
29-
}
30-
event.Attendees = attendees
3123
e := &vEvent{
3224
Event: event,
3325
DtStamp: FormatDateTime(time.Now()),
@@ -68,15 +60,6 @@ func (event *Event) Generate(prodId string) (string, error) {
6860
Events: []string{},
6961
}
7062

71-
attendees := make([]Attendee, 0, len(event.Attendees))
72-
for _, att := range event.Attendees {
73-
if att.Rsvp == "" {
74-
att.Rsvp = Rsvp_False
75-
attendees = append(attendees, att)
76-
}
77-
}
78-
event.Attendees = attendees
79-
8063
e := &vEvent{
8164
Event: event,
8265
DtStamp: FormatDateTime(time.Now()),

objects.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ type Attendee struct {
5959
PartStatus AttendeeStatus
6060
//RSVP is by default NO
6161
CuType CalendarUserType
62-
Rsvp RSVP
6362
}
6463

6564
type Role string
@@ -81,12 +80,3 @@ type CalendarUserType string
8180
const (
8281
INDIVIDUAL CalendarUserType = "INDIVIDUAL"
8382
)
84-
85-
// https://datatracker.ietf.org/doc/html/rfc5545#section-3.2.12
86-
// https://datatracker.ietf.org/doc/html/rfc5545#section-3.2.17
87-
type RSVP string
88-
89-
const (
90-
Rsvp_False RSVP = "FALSE"
91-
Rsvp_True RSVP = "TRUE"
92-
)

templates.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ VERSION:2.0
99

1010
const vevent = `BEGIN:VEVENT
1111
ORGANIZER;CN="{{.Organizer.CommonName}}":mailto:{{.Organizer.EmailAddress}}
12-
{{range $at := .Attendees}}ATTENDEE;CUTYPE={{$at.CuType}};ROLE={{$at.Role}};PARTSTAT={{$at.PartStatus}};CN="{{$at.CommonName}}";RSVP={{$at.Rsvp}}:mailto:{{$at.EmailAddress}}
12+
{{range $at := .Attendees}}ATTENDEE;CUTYPE={{$at.CuType}};ROLE={{$at.Role}};PARTSTAT={{$at.PartStatus}};CN="{{$at.CommonName}}";RSVP=FALSE:mailto:{{$at.EmailAddress}}
1313
{{end}}LOCATION:{{.Location}}
1414
DTSTAMP:{{.DtStamp}}
1515
DTSTART:{{.DtStart}}

0 commit comments

Comments
 (0)