mirror of
https://github.com/openvk/openvk
synced 2024-12-23 00:51:03 +03:00
VKAPI: Change behaviour of start_from and next_from params. Timestamp can cause issues, so i just changed it to 'internal' id
This commit is contained in:
parent
343acabff2
commit
863fb232e0
1 changed files with 2 additions and 2 deletions
|
@ -26,7 +26,7 @@ final class Newsfeed extends VKAPIRequestHandler
|
|||
->select("id")
|
||||
->where("wall IN (?)", $ids)
|
||||
->where("deleted", 0)
|
||||
->where("created < (?)", empty($start_from) ? time()+1 : $start_from)
|
||||
->where("id < (?)", empty($start_from) ? time()+1 : $start_from)
|
||||
->order("created DESC");
|
||||
|
||||
$rposts = [];
|
||||
|
@ -34,7 +34,7 @@ final class Newsfeed extends VKAPIRequestHandler
|
|||
$rposts[] = (new PostsRepo)->get($post->id)->getPrettyId();
|
||||
|
||||
$response = (new Wall)->getById(implode(',', $rposts), $extended, $fields, $this->getUser());
|
||||
$response->next_from = end($response->items)->date;
|
||||
$response->next_from = end($response->items)->id;
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue