mirror of
https://github.com/openvk/openvk
synced 2024-12-23 00:51:03 +03:00
parent
6b86c204ab
commit
4ba7c5b982
2 changed files with 9 additions and 4 deletions
|
@ -25,7 +25,7 @@ final class Users extends VKAPIRequestHandler
|
|||
|
||||
for($i=0; $i < $ic; $i++) {
|
||||
$usr = $users->get((int) $usrs[$i]);
|
||||
if(is_null($usr)) {
|
||||
if(is_null($usr) || $usr->isDeleted()) {
|
||||
$response[$i] = (object)[
|
||||
"id" => $usrs[$i],
|
||||
"first_name" => "DELETED",
|
||||
|
|
|
@ -12,16 +12,21 @@ use openvk\Web\Models\Repositories\Comments as CommentsRepo;
|
|||
|
||||
final class Wall extends VKAPIRequestHandler
|
||||
{
|
||||
function get(string $owner_id, string $domain = "", int $offset = 0, int $count = 30, int $extended = 0): object
|
||||
function get(int $owner_id, string $domain = "", int $offset = 0, int $count = 30, int $extended = 0): object
|
||||
{
|
||||
$posts = new PostsRepo;
|
||||
|
||||
$items = [];
|
||||
$profiles = [];
|
||||
$groups = [];
|
||||
$count = $posts->getPostCountOnUserWall((int) $owner_id);
|
||||
$count = $posts->getPostCountOnUserWall($owner_id);
|
||||
|
||||
foreach($posts->getPostsFromUsersWall((int)$owner_id, 1, $count, $offset) as $post) {
|
||||
$wallOnwer = (new UsersRepo)->get($owner_id);
|
||||
|
||||
if(!$wallOnwer || $wallOnwer->isDeleted() || $wallOnwer->isDeleted())
|
||||
$this->fail(18, "User was deleted or banned");
|
||||
|
||||
foreach($posts->getPostsFromUsersWall($owner_id, 1, $count, $offset) as $post) {
|
||||
$from_id = get_class($post->getOwner()) == "openvk\Web\Models\Entities\Club" ? $post->getOwner()->getId() * (-1) : $post->getOwner()->getId();
|
||||
|
||||
$attachments = [];
|
||||
|
|
Loading…
Reference in a new issue