diff --git a/plugins/tasklist/tasklist.js b/plugins/tasklist/tasklist.js index b39d9686..979f45fa 100644 --- a/plugins/tasklist/tasklist.js +++ b/plugins/tasklist/tasklist.js @@ -2516,7 +2516,7 @@ function rcube_tasklist_ui(settings) } // tell server to send notifications - if ((data.attendees.length || (rec.id && rec.attendees.length)) && allow_invitations && (notify.checked || invite.checked || need_invitation)) { + if ((has_attendees(data) || (rec.id && has_attendees(rec))) && allow_invitations && (notify.checked || invite.checked || need_invitation)) { data._notify = settings.itip_notify; data._comment = comment.val(); } diff --git a/plugins/tasklist/tasklist.php b/plugins/tasklist/tasklist.php index 16518a57..051fb418 100644 --- a/plugins/tasklist/tasklist.php +++ b/plugins/tasklist/tasklist.php @@ -527,9 +527,12 @@ class tasklist extends rcube_plugin $this->rc->output->show_message('tasklist.errornotifying', 'error'); } } - else if ($success && $rec['_reportpartstat'] && $rec['_reportpartstat'] != 'NEEDS-ACTION') { + + if ($success && $rec['_reportpartstat'] && $rec['_reportpartstat'] != 'NEEDS-ACTION') { // get the full record after update - $task = $this->driver->get_task($rec); + if (!$task) { + $task = $this->driver->get_task($rec); + } // send iTip REPLY with the updated partstat if ($task['organizer'] && ($idx = $this->is_attendee($task)) !== false) {