VKAPI: Add original author info with extended=1 if reposted

This commit is contained in:
Dmitry Tretyakov 2023-11-18 12:01:33 +07:00 committed by GitHub
parent 2b9e316b80
commit 3c624a9c78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -144,6 +144,13 @@ final class Wall extends VKAPIRequestHandler
"attachments" => $repostAttachments, "attachments" => $repostAttachments,
"post_source" => $post_source, "post_source" => $post_source,
]; ];
if ($attachment->getVirtualId() > 0)
$profiles[] = $attachment->getVirtualId();
else
$groups[] = $attachment->getVirtualId();
if($post->isSigned())
$profiles[] = $attachment->getOwner()->getId();
} }
} }
@ -339,6 +346,13 @@ final class Wall extends VKAPIRequestHandler
"attachments" => $repostAttachments, "attachments" => $repostAttachments,
"post_source" => $post_source, "post_source" => $post_source,
]; ];
if ($attachment->getVirtualId() > 0)
$profiles[] = $attachment->getVirtualId();
else
$groups[] = $attachment->getVirtualId();
if($post->isSigned())
$profiles[] = $attachment->getOwner()->getId();
} }
} }