Calendar: Rework some phrasing in the preference, make sure it only applies to "responses", not other changes

This commit is contained in:
nathangray 2019-11-04 10:51:39 -07:00
parent bf844b7598
commit 724b2ad329
2 changed files with 8 additions and 7 deletions

View File

@ -608,6 +608,12 @@ class calendar_boupdate extends calendar_bo
//
$msg_is_response = $msg_type == MSG_REJECTED || $msg_type == MSG_ACCEPTED || $msg_type == MSG_TENTATIVE || $msg_type == MSG_DELEGATED;
// Check if user is not participating, and does not want notifications
if($msg_is_response && !$part_prefs['calendar']['receive_not_participating'] && !array_key_exists($userid, $old_event['participants']))
{
return false;
}
// always notify externals chairs
// EGroupware owner only get notified about responses, if pref is NOT "no"
if (!is_numeric($userid) && $role == 'CHAIR' &&
@ -632,11 +638,6 @@ class calendar_boupdate extends calendar_bo
}
else
{
// Check if user is not participating, and does not want notifications
if(!$part_prefs['calendar']['receive_not_participating'] && !array_key_exists($userid, $old_event['participants']))
{
return false;
}
switch($ru = $part_prefs['calendar']['receive_updates'])
{
case 'responses':

View File

@ -528,10 +528,10 @@ class calendar_hooks
),
'receive_not_participating' => array(
'type' => 'select',
'label' => 'Receive notifications about events you are not a participant in',
'label' => 'Do you want responses from events you are not participating in?',
'name' => 'receive_not_participating',
'values' => $yesno,
'help' => 'Do you want to be notified about events you created, but are not participating in?',
'help' => 'Do you want to be notified about participant responses from events you created, but are not participating in?',
'default'=> '1'
),
'notify_externals' => array(