Add webhook trigger

This commit is contained in:
osaajani 2021-03-26 17:55:47 +01:00
parent fcbb44df98
commit 6ce6a85f13
1 changed files with 10 additions and 1 deletions

View File

@ -75,8 +75,17 @@ namespace controllers\internals;
{
return false;
}
$new_call_id = $this->get_model()->insert($call);
if (!$new_call_id)
{
return false;
}
$internal_webhook = new Webhook($this->bdd);
$internal_webhook->trigger($id_user, \models\Webhook::TYPE_INBOUND_CALL, $call);
return $this->get_model()->insert($call);
return $new_call_id;
}