Update templating and conditional groups to add contact_metas

This commit is contained in:
osaajani 2020-09-26 21:34:42 +02:00
parent 6062446027
commit 8d86f576d8
4 changed files with 22 additions and 3 deletions

View file

@ -335,7 +335,15 @@ namespace controllers\internals;
if ((int) ($users_settings[$scheduled['id_user']]['templating'] ?? false))
{
$contact['datas'] = json_decode($contact['datas'], true);
$datas = ['contact' => $contact['datas']];
//Add metas of contact by adding contact without datas
$metas = $contact;
unset($metas['datas']);
unset($metas['id_user']);
$datas = ['contact' => $contact['datas'], 'contact_metas' => $metas];
$render = $internal_templating->render($scheduled['text'], $datas);
if (!$render['success'])