diff --git a/src/internal/converters/ics/ics.go b/src/internal/converters/ics/ics.go index 1aceccd1f..291d78bdf 100644 --- a/src/internal/converters/ics/ics.go +++ b/src/internal/converters/ics/ics.go @@ -339,7 +339,7 @@ func updateEventProperties(ctx context.Context, event models.Eventable, iCalEven // STATUS - https://www.rfc-editor.org/rfc/rfc5545#section-3.8.1.11 cancelled := event.GetIsCancelled() - if cancelled != nil { + if cancelled != nil && ptr.Val(cancelled) { iCalEvent.SetStatus(ics.ObjectStatusCancelled) } diff --git a/src/internal/converters/ics/ics_test.go b/src/internal/converters/ics/ics_test.go index f1434f615..798d2f595 100644 --- a/src/internal/converters/ics/ics_test.go +++ b/src/internal/converters/ics/ics_test.go @@ -576,6 +576,19 @@ func (suite *ICSUnitSuite) TestEventConversion() { assert.Contains(t, out, "STATUS:CANCELLED", "cancelled status") }, }, + { + name: "not cancelled event", + event: func() *models.Event { + e := baseEvent() + + e.SetIsCancelled(ptr.To(false)) + + return e + }, + check: func(out string) { + assert.NotContains(t, out, "STATUS:CANCELLED", "cancelled status") + }, + }, { name: "text body", event: func() *models.Event {