From 7384c2833a89b9c7a312879bedffed383fba670b Mon Sep 17 00:00:00 2001 From: Ken Murchison Date: Thu, 17 Aug 2023 12:10:42 -0400 Subject: [PATCH] http_caldav_sched.c: add caldav_send_partstat_updates option --- changes/next/caldav_send_partstat_updates | 15 +++++++++++++++ imap/http_caldav_sched.c | 3 +-- lib/imapoptions | 5 +++++ 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 changes/next/caldav_send_partstat_updates diff --git a/changes/next/caldav_send_partstat_updates b/changes/next/caldav_send_partstat_updates new file mode 100644 index 0000000000..b3b6e610d0 --- /dev/null +++ b/changes/next/caldav_send_partstat_updates @@ -0,0 +1,15 @@ + +Description: + +Allow control over whether updated invites are sent when an attendee changes +their participation status. + + +Config changes: + +Added 'caldav_send_partstat_updates' switch + + +Upgrade instructions: + +None. diff --git a/imap/http_caldav_sched.c b/imap/http_caldav_sched.c index 1ecb2f9222..18e71221ee 100644 --- a/imap/http_caldav_sched.c +++ b/imap/http_caldav_sched.c @@ -1396,14 +1396,13 @@ void sched_deliver(const char *cal_ownerid, const char *sched_userid, r = sched_deliver_local(sched_userid, sender, recipient, NULL, &sparam, sched_data, authstate, &attendee, &ical); - /* XXX Should this be a config option? - it might have perf implications */ if (r == 1 && SCHED_IS_REPLY(sched_data)) { /* Send updates to attendees - skipping sender of reply */ icalcomponent *comp = icalcomponent_get_first_real_component(ical); if (icalcomponent_isa(comp) == ICAL_VPOLL_COMPONENT) sched_pollstatus(cal_ownerid, sched_userid, recipient, &sparam, ical, attendee); - else + else if (config_getswitch(IMAPOPT_CALDAV_SEND_PARTSTAT_UPDATES)) sched_request(cal_ownerid, sched_userid, NULL, recipient, NULL, ical, sched_data->mech); // oldical? } diff --git a/lib/imapoptions b/lib/imapoptions index 1401f62400..4bea9e41c9 100644 --- a/lib/imapoptions +++ b/lib/imapoptions @@ -623,6 +623,11 @@ Blank lines and lines beginning with ``#'' are ignored. If not set (the default), the value of the "servername" option will be used.*/ +{ "caldav_send_partstat_updates", 1, SWITCH, "UNRELEASED" } +/* If enabled, when an attendee replies to the organizer with their + participation status, an updated invite will be sent to all other + attendees. */ + { "calendarprefix", "#calendars", STRING, "2.5.0" } /* The prefix for the calendar mailboxes hierarchies. The hierarchy delimiter will be automatically appended. The public calendar