Skip to content

Commit

Permalink
jmap_calendar.c: properly handle an organizer with a plus address
Browse files Browse the repository at this point in the history
  • Loading branch information
ksmurchison committed Sep 19, 2024
1 parent c4e0415 commit 423fa3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions imap/jmap_calendar.c
Original file line number Diff line number Diff line change
Expand Up @@ -4148,9 +4148,8 @@ static int setcalendarevents_schedule(const char *sched_userid,
icalcomponent_get_first_property(comp, ICAL_ORGANIZER_PROPERTY);
if (!prop) goto done;

const char *organizer = icalproperty_get_organizer(prop);
char *organizer = icalproperty_get_decoded_participant(prop);
if (!organizer) goto done;
if (!strncasecmp(organizer, "mailto:", 7)) organizer += 7;
if (organizer &&
/* XXX Hack for Outlook */ icalcomponent_get_first_invitee(comp)) {

Expand Down Expand Up @@ -4182,6 +4181,7 @@ static int setcalendarevents_schedule(const char *sched_userid,
oldical, newical, SCHED_MECH_JMAP_SET);
}
}
free(organizer);

done:
if (oldical) icalcomponent_free(oldical);
Expand Down

0 comments on commit 423fa3c

Please sign in to comment.