- DEBUGGING

parent f489e401
...@@ -141,6 +141,7 @@ class UnisenderAPI { ...@@ -141,6 +141,7 @@ class UnisenderAPI {
* @return bool * @return bool
*/ */
public function isReaded(){ public function isReaded(){
var_dump($this->statuses);
if (array_key_exists('result', $this->statuses) && array_key_exists('status', $this->statuses['result'])) { if (array_key_exists('result', $this->statuses) && array_key_exists('status', $this->statuses['result'])) {
if ($this->statuses['result']['status']==ConditionBase::MESSAGE_READ || $this->statuses['result']['status']==ConditionBase::MESSAGE_UNSUBSCRIBED || $this->statuses['result']['status']==ConditionBase::MESSAGE_SPAM_FOLDER) if ($this->statuses['result']['status']==ConditionBase::MESSAGE_READ || $this->statuses['result']['status']==ConditionBase::MESSAGE_UNSUBSCRIBED || $this->statuses['result']['status']==ConditionBase::MESSAGE_SPAM_FOLDER)
return true; return true;
......
...@@ -54,7 +54,6 @@ class DefaultController extends BaseController ...@@ -54,7 +54,6 @@ class DefaultController extends BaseController
foreach($actualTriggers as $trigger) { foreach($actualTriggers as $trigger) {
// Вызвали метод проверки срабатывания условий // Вызвали метод проверки срабатывания условий
$triggerResult = Conditions::init()->handleMessageByTriggerId($message, $trigger->getPrimaryKey()); $triggerResult = Conditions::init()->handleMessageByTriggerId($message, $trigger->getPrimaryKey());
echo $trigger->name.'('.(($triggerResult) ? 'true' : 'false').')'.'<br>';
// Если триггер сработал инициируем действие // Если триггер сработал инициируем действие
if ($triggerResult===true) { if ($triggerResult===true) {
$triggerIsUsed=true; $triggerIsUsed=true;
......
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