Skip to content

Commit 4715c2b

Browse files
committed
fix: invitees disappear from meetings with resources
mapi_message_modifyrecipients called with MODRECIP_MODIFY flag clears the recipient table, so it is necessary to pass all the recipients. References: grommunio-web#278
1 parent 6a55873 commit 4715c2b

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

class.meetingrequest.php

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2821,25 +2821,15 @@ public function bookResources($message, $cancel, $prefix, $basedate = false): ar
28212821
++$i;
28222822
}
28232823

2824-
/*
2825-
* Set the BCC-recipients (resources) tackstatus to accepted.
2826-
*/
2827-
// Get resource recipients
2828-
$getResourcesRestriction = [
2829-
RES_PROPERTY,
2830-
[
2831-
RELOP => RELOP_EQ, // Equals recipient type 3: Resource
2832-
ULPROPTAG => PR_RECIPIENT_TYPE,
2833-
VALUE => [PR_RECIPIENT_TYPE => MAPI_BCC],
2834-
],
2835-
];
28362824
$recipienttable = mapi_message_getrecipienttable($message);
2837-
$resourceRecipients = mapi_table_queryallrows($recipienttable, $this->recipprops, $getResourcesRestriction);
2825+
$resourceRecipients = mapi_table_queryallrows($recipienttable, $this->recipprops);
28382826
if (!empty($resourceRecipients)) {
28392827
// Set Tracking status of resource recipients to olResponseAccepted (3)
28402828
for ($i = 0, $len = count($resourceRecipients); $i < $len; ++$i) {
2841-
$resourceRecipients[$i][PR_RECIPIENT_TRACKSTATUS] = olRecipientTrackStatusAccepted;
2842-
$resourceRecipients[$i][PR_RECIPIENT_TRACKSTATUS_TIME] = time();
2829+
if (isset($resourceRecipients[$i][PR_RECIPIENT_TYPE]) && $resourceRecipients[$i][PR_RECIPIENT_TYPE] == MAPI_BCC) {
2830+
$resourceRecipients[$i][PR_RECIPIENT_TRACKSTATUS] = olRecipientTrackStatusAccepted;
2831+
$resourceRecipients[$i][PR_RECIPIENT_TRACKSTATUS_TIME] = time();
2832+
}
28432833
}
28442834
mapi_message_modifyrecipients($message, MODRECIP_MODIFY, $resourceRecipients);
28452835
}

0 commit comments

Comments
 (0)