Skip to content

Commit 240d3e6

Browse files
committed
Only add organizer to recipient table for meetings
References: Issue #134
1 parent 7cc3fef commit 240d3e6

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

lib/grommunio/mapiprovider.php

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1800,16 +1800,19 @@ private function setAppointment($mapimessage, $appointment) {
18001800
$recips = [];
18011801

18021802
// Outlook XP requires organizer in the attendee list as well
1803-
$org = [];
1804-
$org[PR_ENTRYID] = isset($representingprops[$appointmentprops["representingentryid"]]) ? $representingprops[$appointmentprops["representingentryid"]] : $props[$appointmentprops["representingentryid"]];
1805-
$org[PR_DISPLAY_NAME] = isset($representingprops[$appointmentprops["representingname"]]) ? $representingprops[$appointmentprops["representingname"]] : $props[$appointmentprops["representingname"]];
1806-
$org[PR_ADDRTYPE] = isset($representingprops[$appointmentprops["sentrepresentingaddt"]]) ? $representingprops[$appointmentprops["sentrepresentingaddt"]] : $props[$appointmentprops["sentrepresentingaddt"]];
1807-
$org[PR_SMTP_ADDRESS] = $org[PR_EMAIL_ADDRESS] = isset($representingprops[$appointmentprops["sentrepresentingemail"]]) ? $representingprops[$appointmentprops["sentrepresentingemail"]] : $props[$appointmentprops["sentrepresentingemail"]];
1808-
$org[PR_SEARCH_KEY] = isset($representingprops[$appointmentprops["sentrepresentinsrchk"]]) ? $representingprops[$appointmentprops["sentrepresentinsrchk"]] : $props[$appointmentprops["sentrepresentinsrchk"]];
1809-
$org[PR_RECIPIENT_FLAGS] = recipOrganizer | recipSendable;
1810-
$org[PR_RECIPIENT_TYPE] = MAPI_ORIG;
1811-
1812-
array_push($recips, $org);
1803+
// Only add organizer if it's a meeting
1804+
if ($isMeeting) {
1805+
$org = [];
1806+
$org[PR_ENTRYID] = isset($representingprops[$appointmentprops["representingentryid"]]) ? $representingprops[$appointmentprops["representingentryid"]] : $props[$appointmentprops["representingentryid"]];
1807+
$org[PR_DISPLAY_NAME] = isset($representingprops[$appointmentprops["representingname"]]) ? $representingprops[$appointmentprops["representingname"]] : $props[$appointmentprops["representingname"]];
1808+
$org[PR_ADDRTYPE] = isset($representingprops[$appointmentprops["sentrepresentingaddt"]]) ? $representingprops[$appointmentprops["sentrepresentingaddt"]] : $props[$appointmentprops["sentrepresentingaddt"]];
1809+
$org[PR_SMTP_ADDRESS] = $org[PR_EMAIL_ADDRESS] = isset($representingprops[$appointmentprops["sentrepresentingemail"]]) ? $representingprops[$appointmentprops["sentrepresentingemail"]] : $props[$appointmentprops["sentrepresentingemail"]];
1810+
$org[PR_SEARCH_KEY] = isset($representingprops[$appointmentprops["sentrepresentinsrchk"]]) ? $representingprops[$appointmentprops["sentrepresentinsrchk"]] : $props[$appointmentprops["sentrepresentinsrchk"]];
1811+
$org[PR_RECIPIENT_FLAGS] = recipOrganizer | recipSendable;
1812+
$org[PR_RECIPIENT_TYPE] = MAPI_ORIG;
1813+
1814+
array_push($recips, $org);
1815+
}
18131816

18141817
// remove organizer from old_receips
18151818
if (isset($old_receips[$org[PR_EMAIL_ADDRESS]])) {

0 commit comments

Comments
 (0)