mirror of
https://github.com/openvk/openvk
synced 2024-12-23 09:01:15 +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++) {
|
for($i=0; $i < $ic; $i++) {
|
||||||
$usr = $users->get((int) $usrs[$i]);
|
$usr = $users->get((int) $usrs[$i]);
|
||||||
if(is_null($usr)) {
|
if(is_null($usr) || $usr->isDeleted()) {
|
||||||
$response[$i] = (object)[
|
$response[$i] = (object)[
|
||||||
"id" => $usrs[$i],
|
"id" => $usrs[$i],
|
||||||
"first_name" => "DELETED",
|
"first_name" => "DELETED",
|
||||||
|
|
|
@ -12,16 +12,21 @@ use openvk\Web\Models\Repositories\Comments as CommentsRepo;
|
||||||
|
|
||||||
final class Wall extends VKAPIRequestHandler
|
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;
|
$posts = new PostsRepo;
|
||||||
|
|
||||||
$items = [];
|
$items = [];
|
||||||
$profiles = [];
|
$profiles = [];
|
||||||
$groups = [];
|
$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();
|
$from_id = get_class($post->getOwner()) == "openvk\Web\Models\Entities\Club" ? $post->getOwner()->getId() * (-1) : $post->getOwner()->getId();
|
||||||
|
|
||||||
$attachments = [];
|
$attachments = [];
|
||||||
|
|
Loading…
Reference in a new issue