Commit 328c8338 authored by Shakarim Sapa's avatar Shakarim Sapa

- Добавлен метод проверяющий письмо на открыто/не открыто

parent 539e2abf
......@@ -120,7 +120,18 @@ class UnisenderAPI {
*/
public function isReaded(){
if (array_key_exists('result', $this->statuses) && array_key_exists('status', $this->statuses['result'])) {
if ($this->statuses['result']['status']==ConditionBase::MESSAGE_READ)
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 false;
}
/**
* @return bool
*/
public function isDelivered(){
if (array_key_exists('result', $this->statuses) && array_key_exists('status', $this->statuses['result'])) {
if ($this->statuses['result']['status']==ConditionBase::MESSAGE_DELIVERED || $this->statuses['result']['status']==ConditionBase::MESSAGE_LINK_VISITED || $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 false;
......
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