mirror of
https://github.com/openvk/openvk
synced 2024-12-23 00:51:03 +03:00
Prevent deleted attachments from showing in wall.get
This commit is contained in:
parent
b985057b49
commit
bfa26c24d1
1 changed files with 6 additions and 5 deletions
|
@ -23,11 +23,12 @@ final class Wall extends VKAPIRequestHandler
|
||||||
foreach ($posts->getPostsFromUsersWall((int)$owner_id, 1, $count, $offset) as $post) {
|
foreach ($posts->getPostsFromUsersWall((int)$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 = [];
|
||||||
foreach($post->getChildren() as $attachment)
|
foreach($post->getChildren() as $attachment) {
|
||||||
{
|
if($attachment instanceof \openvk\Web\Models\Entities\Photo) {
|
||||||
if($attachment instanceof \openvk\Web\Models\Entities\Photo)
|
if($attachment->isDeleted())
|
||||||
{
|
continue;
|
||||||
|
|
||||||
$attachments[] = [
|
$attachments[] = [
|
||||||
"type" => "photo",
|
"type" => "photo",
|
||||||
"photo" => [
|
"photo" => [
|
||||||
|
|
Loading…
Reference in a new issue