forked from extern/egroupware
Add a call notification when receiving an event alarm
This commit is contained in:
parent
a6e6393943
commit
7c14d09409
@ -1159,7 +1159,7 @@ class calendar_boupdate extends calendar_bo
|
||||
'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));
|
||||
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')));
|
||||
|
||||
|
@ -880,7 +880,21 @@ END:VALARM';
|
||||
{
|
||||
Api\Translation::add_app('calendar');
|
||||
// do not set actions for alarm type
|
||||
if ($params['data']['type'] == 6) return array();
|
||||
if ($params['data']['type'] == 6)
|
||||
{
|
||||
if (!empty($params['data']['videoconference']))
|
||||
{
|
||||
return [
|
||||
array(
|
||||
'id' => 'J',
|
||||
'caption' => lang('Join'),
|
||||
'icon' => 'accept_call',
|
||||
'onExecute' => 'app.status.openCall("'.$params['data']['videoconference'].'");'
|
||||
)
|
||||
];
|
||||
}
|
||||
return array();
|
||||
}
|
||||
return array(
|
||||
array(
|
||||
'id' => 'A',
|
||||
|
@ -356,6 +356,10 @@
|
||||
switch (notifymessages[id]['extra_data']['egw_pr_notify'])
|
||||
{
|
||||
case EGW_PR_NOTIFY_HEIGH:
|
||||
if (notifymessages[id]['extra_data']['videoconference'])
|
||||
{
|
||||
app.status.notificationPopup(notifymessages[id]['extra_data']['videoconference']);
|
||||
}
|
||||
poped.push(id);
|
||||
this.toggle(true);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user