aboutsummaryrefslogtreecommitdiffstats
path: root/lib/calendar
diff options
context:
space:
mode:
authorMoritz Poldrack <git@moritz.sh>2024-02-02 17:55:39 +0100
committerRobin Jarry <robin@jarry.cc>2024-02-11 21:24:18 +0100
commit2e7c88ae7a6a064a421c6dcd14da602f1be19571 (patch)
treedadc7f4c941acb4d58f3e9f900f9949beadcb3b0 /lib/calendar
parentc618ac9a02fc207f72a8f004785c622c72ac5e9a (diff)
downloadaerc-2e7c88ae7a6a064a421c6dcd14da602f1be19571.tar.gz
calendar: make invitation matching case-insensitive
Since some organisations are using capitalised email-adresses, there is no guarantee that invitations are received by an address of the same case. Fixes: 62982a9a ("invites: reply with accept, accept-tentative or decline") Changelog-fixed: Calendar responses now ignore case. Reported-by: "Bart Libert" <bart@libert.email> Signed-off-by: Moritz Poldrack <git@moritz.sh> Tested-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'lib/calendar')
-rw-r--r--lib/calendar/calendar.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/calendar/calendar.go b/lib/calendar/calendar.go
index c15e0351..a4a62016 100644
--- a/lib/calendar/calendar.go
+++ b/lib/calendar/calendar.go
@@ -167,8 +167,9 @@ type event struct {
func (e *event) isReplyRequested(from string) error {
var present bool = false
var rsvp bool = false
+ from = strings.ToLower(from)
for _, a := range e.Attendees() {
- if a.Email() == from {
+ if strings.ToLower(a.Email()) == from {
present = true
if r, ok := a.ICalParameters[string(ics.ParameterRsvp)]; ok {
if len(r) > 0 && strings.ToLower(r[0]) == "true" {