From e21f6a9fc2cf4c2d07455a901a47f9fdcb27d51b Mon Sep 17 00:00:00 2001 From: Matthew Grove Date: Sun, 25 Aug 2024 17:29:05 +0100 Subject: [PATCH] Add location transformations --- calendar.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/calendar.go b/calendar.go index 1571e8a..956bbcf 100644 --- a/calendar.go +++ b/calendar.go @@ -186,6 +186,13 @@ func (filter Filter) transformEvent(event *ics.VEvent) { } else if filter.Transform.Description.Replace != "" { event.SetDescription(filter.Transform.Description.Replace) } + + // Location transformations + if filter.Transform.Location.Remove { + event.SetLocation("") + } else if filter.Transform.Location.Replace != "" { + event.SetLocation(filter.Transform.Location.Replace) + } } // EventMatchRules contains VEvent properties that user can match against