This commit is contained in:
veselcraft 2023-02-21 00:59:52 +03:00
parent 54092eb6c0
commit 9d6e81f990
No known key found for this signature in database
GPG key ID: AED66BC1AC628A4E

View file

@ -219,40 +219,7 @@ final class Wall extends VKAPIRequestHandler
} else if($attachment instanceof \openvk\Web\Models\Entities\Poll) {
$attachments[] = $this->getApiPoll($attachment, $user);
} else if ($attachment instanceof \openvk\Web\Models\Entities\Video) {
$video = [
"type" => "video",
"video" => [
"can_comment" => 1,
"can_like" => 0, // we don't h-have wikes in videos
"can_repost" => 0,
"can_subscribe" => 1,
"can_add_to_faves" => 0,
"can_add" => 0,
"comments" => $attachment->getCommentsCount(),
"date" => $attachment->getPublicationTime()->timestamp(),
"description" => $attachment->getDescription(),
"duration" => 0, // я хуй знает как получить длину видео
"image" => [
[
"url" => $attachment->getThumbnailURL(),
"width" => 320,
"height" => 240,
"with_padding" => 1
]
],
"width" => 640,
"height" => 480,
"id" => $attachment->getVirtualId(),
"owner_id" => $attachment->getOwner()->getId(),
"user_id" => $attachment->getOwner()->getId(),
"title" => $attachment->getName(),
"is_favorite" => false,
"repeat" => 0,
"type" => "video",
"views" => 0, // у нас просмотров нет)
]
];
$attachments[] = $video;
$attachments[] = $attachment->getApiStructure();
} else if ($attachment instanceof \openvk\Web\Models\Entities\Post) {
$repostAttachments = [];