mirror of
https://github.com/twisterarmy/twister-rss-bot.git
synced 2025-02-07 20:54:31 +00:00
fix post counting
This commit is contained in:
parent
152d889fa5
commit
305befd2f0
@ -143,21 +143,16 @@ foreach ($config->feed as $feed)
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Get post k
|
// Get post k
|
||||||
$k = 0;
|
$k = 1;
|
||||||
|
|
||||||
if ($posts = $twister->getPosts([$feed->target], 1))
|
if ($posts = $twister->getPosts([$feed->target], 1))
|
||||||
{
|
{
|
||||||
if (isset($posts[0]['userpost']['k']))
|
if (isset($posts['result'][0]['userpost']['k']))
|
||||||
{
|
{
|
||||||
$k = (int) $posts[0]['userpost']['k'] + 1;
|
$k = (int) $posts['result'][0]['userpost']['k'] + 1;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!$k)
|
else continue;
|
||||||
{
|
|
||||||
echo _('Could not get user post K value') . PHP_EOL;
|
|
||||||
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send each message to the twister account
|
// Send each message to the twister account
|
||||||
|
Loading…
x
Reference in New Issue
Block a user