Fix alarm-offset not being sent to client

This commit is contained in:
Hadi Nategh 2020-04-07 18:01:55 +02:00
parent 6fd9ce2a52
commit f940f25998
2 changed files with 10 additions and 3 deletions

View File

@ -1154,9 +1154,16 @@ class calendar_boupdate extends calendar_bo
'id' => $event['id'],
'app' => 'calendar',
'videoconference' => $details['videoconference'],
) + ($alarm ? ['alarm-offset' => (int)$alarm['offset']] : []));
));
}
if ($m_type === MSG_ALARM)
{
$notification->set_popupdata('calendar',
array('egw_pr_notify' => 1,
'type' => $m_type,
'videoconference' => $details['videoconference'])
+ ($alarm ? ['alarm-offset' => (int)$alarm['offset']] : []));
}
if ($m_type === MSG_ALARM) $notification->set_popupdata('calendar', array('egw_pr_notify' => 1, 'type' => $m_type, 'videoconference' => $details['videoconference']));
$notification->set_popupmessage($subject."\n\n".$notify_body."\n\n".$details['description']."\n\n".$details_body."\n\n");
$notification->set_popuplinks(array($details['link_arr']+array('app'=>'calendar')));

View File

@ -356,7 +356,7 @@
switch (notifymessages[id]['extra_data']['egw_pr_notify'])
{
case EGW_PR_NOTIFY_HEIGH:
if (notifymessages[id]['extra_data']['videoconference'])
if (notifymessages[id]['extra_data']['videoconference'] && notifymessages[id]['extra_data']['alarm-offset'] == 300)
{
app.status.notificationPopup(notifymessages[id]['extra_data']['videoconference']);
}