From 2f7e082d66b3fbbbb7a4cb3768c184b72f7e32f7 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 7 Apr 2020 18:01:55 +0200 Subject: [PATCH] Fix alarm-offset not being sent to client --- calendar/inc/class.calendar_boupdate.inc.php | 11 +++++++++-- notifications/js/notificationajaxpopup.js | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/calendar/inc/class.calendar_boupdate.inc.php b/calendar/inc/class.calendar_boupdate.inc.php index 97ade18b39..7e9fe0df15 100644 --- a/calendar/inc/class.calendar_boupdate.inc.php +++ b/calendar/inc/class.calendar_boupdate.inc.php @@ -1157,9 +1157,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'))); diff --git a/notifications/js/notificationajaxpopup.js b/notifications/js/notificationajaxpopup.js index c1e74277fb..c604c10133 100644 --- a/notifications/js/notificationajaxpopup.js +++ b/notifications/js/notificationajaxpopup.js @@ -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']); }