API: can_edit can_delete comments

This commit is contained in:
ZAZiOs 2025-06-12 00:42:27 +03:00
parent ad94b770e1
commit 0d2a015ae7

View file

@ -873,6 +873,8 @@ final class Wall extends VKAPIRequestHandler
"id" => $comment->getId(),
"from_id" => $oid,
"date" => $comment->getPublicationTime()->timestamp(),
"can_edit" => $post->canBeEditedBy($this->getUser()),
"can_delete" => $post->canBeDeletedBy($this->getUser()),
"text" => $comment->getText(false),
"post_id" => $post->getVirtualId(),
"owner_id" => method_exists($post, 'isPostedOnBehalfOfGroup') && $post->isPostedOnBehalfOfGroup() ? $post->getOwner()->getId() * -1 : $post->getOwner()->getId(),