mirror of
https://github.com/twisterarmy/twister-phpbot.git
synced 2025-03-13 05:51:26 +00:00
check userpost existence instead of error code
This commit is contained in:
parent
c4fbb9e302
commit
f84b99c862
@ -101,7 +101,7 @@ class TwisterPost
|
||||
$k = $this->maxId + 1;
|
||||
$text = escapeshellarg($text);
|
||||
$result = $this->runRpcCommand('newpostmsg', "{$this->user} $k $text");
|
||||
if (isset($result->code) && $result->code < 0) {
|
||||
if (!isset($result->userpost) || !isset($result->userpost->k) || ($result->userpost->k != $k)) {
|
||||
$this->maxId = -1;
|
||||
$this->lastError = $result;
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user