Browse Source

skip promo messages

master
Denis Ryabov 11 years ago
parent
commit
c4fbb9e302
  1. 20
      twisterpost.php

20
twisterpost.php

@ -62,9 +62,9 @@ class TwisterPost
$this->lastError = $result; $this->lastError = $result;
return false; return false;
} }
if (isset($result[0])) { foreach($result as $item) {
if (isset($result[0]->userpost->k)) { if (isset($item->userpost->n) && $item->userpost->n === $this->user) {
$this->maxId = $result[0]->userpost->k; $this->maxId = $item->userpost->k;
} }
} }
@ -74,12 +74,14 @@ class TwisterPost
$this->lastError = $result; $this->lastError = $result;
return false; return false;
} }
if (isset($result[0]) && isset($result[0]->p)) { foreach($result as $item) {
if (isset($result[0]->p->seq)) { if (isset($item->sig_user) && isset($item->p) && $item->sig_user === $this->user) {
$this->maxId = max($this->maxId, $result[0]->p->seq); if (isset($item->p->seq)) {
} $this->maxId = max($this->maxId, $item->p->seq);
if (isset($result[0]->p->v) && isset($result[0]->p->v->userpost) && isset($result[0]->p->v->userpost->k)) { }
$this->maxId = max($this->maxId, $result[0]->p->v->userpost->k); if (isset($item->p->v) && isset($item->p->v->userpost) && isset($item->p->v->userpost->k)) {
$this->maxId = max($this->maxId, $item->p->v->userpost->k);
}
} }
} }

Loading…
Cancel
Save