From b700627123569c1eb9400237c0dabcd797e5c90e Mon Sep 17 00:00:00 2001 From: lalka2016 <99399973+lalka2016@users.noreply.github.com> Date: Sun, 27 Aug 2023 11:01:05 +0300 Subject: [PATCH] can_edit --- VKAPI/Handlers/Wall.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VKAPI/Handlers/Wall.php b/VKAPI/Handlers/Wall.php index 49765b05..ee23cfef 100644 --- a/VKAPI/Handlers/Wall.php +++ b/VKAPI/Handlers/Wall.php @@ -120,7 +120,7 @@ final class Wall extends VKAPIRequestHandler "post_type" => "post", "text" => $post->getText(false), "copy_history" => $repost, - "can_edit" => 0, # TODO + "can_edit" => $post->getOwner(false)->getId() == $this->getUser()->getId(), "can_delete" => $post->canBeDeletedBy($this->getUser()), "can_pin" => $post->canBePinnedBy($this->getUser()), "can_archive" => false, # TODO MAYBE @@ -295,7 +295,7 @@ final class Wall extends VKAPIRequestHandler "post_type" => "post", "text" => $post->getText(false), "copy_history" => $repost, - "can_edit" => 0, # TODO + "can_edit" => $post->getOwner(false)->getId() == $this->getUser()->getId(), "can_delete" => $post->canBeDeletedBy($user), "can_pin" => $post->canBePinnedBy($user), "can_archive" => false, # TODO MAYBE