mirror of
https://github.com/openvk/openvk
synced 2024-12-22 16:42:32 +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) {
|
||||
$from_id = get_class($post->getOwner()) == "openvk\Web\Models\Entities\Club" ? $post->getOwner()->getId() * (-1) : $post->getOwner()->getId();
|
||||
|
||||
$attachments;
|
||||
foreach($post->getChildren() as $attachment)
|
||||
{
|
||||
if($attachment instanceof \openvk\Web\Models\Entities\Photo)
|
||||
{
|
||||
$attachments = [];
|
||||
foreach($post->getChildren() as $attachment) {
|
||||
if($attachment instanceof \openvk\Web\Models\Entities\Photo) {
|
||||
if($attachment->isDeleted())
|
||||
continue;
|
||||
|
||||
$attachments[] = [
|
||||
"type" => "photo",
|
||||
"photo" => [
|
||||
|
|
Loading…
Reference in a new issue