- FIX

parent 6930fcca
...@@ -231,7 +231,6 @@ class TriggerTrigger extends \common\components\ActiveRecordModel ...@@ -231,7 +231,6 @@ class TriggerTrigger extends \common\components\ActiveRecordModel
$newList = $sender->createList(); $newList = $sender->createList();
$newListObject=Json::decode($newList); $newListObject=Json::decode($newList);
if (array_key_exists('result', $newListObject) && array_key_exists('id', $newListObject['result'])) { if (array_key_exists('result', $newListObject) && array_key_exists('id', $newListObject['result'])) {
return true;
$newListId=$newListObject['result']['id']; $newListId=$newListObject['result']['id'];
// Subscribe user to new List // Subscribe user to new List
$sender->subscribe(['list_ids' => $newListId, 'fields[email]' => $email, 'double_optin' => 1]); $sender->subscribe(['list_ids' => $newListId, 'fields[email]' => $email, 'double_optin' => 1]);
...@@ -240,6 +239,7 @@ class TriggerTrigger extends \common\components\ActiveRecordModel ...@@ -240,6 +239,7 @@ class TriggerTrigger extends \common\components\ActiveRecordModel
// Decode result // Decode result
$newMessageObject=Json::decode($newMessage); $newMessageObject=Json::decode($newMessage);
if (array_key_exists('result', $newMessageObject) && array_key_exists('message_id', $newMessageObject['result'])) { if (array_key_exists('result', $newMessageObject) && array_key_exists('message_id', $newMessageObject['result'])) {
return true;
// Get the message ID // Get the message ID
$newMessageId=$newMessageObject['result']['message_id']; $newMessageId=$newMessageObject['result']['message_id'];
// Create new campaign // Create new campaign
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment