VKAPI: Wall.getById hotfix (for real now)

Resolves GH-909
This commit is contained in:
Österreich Luminota 2023-06-29 22:36:01 +07:00
parent 050ab43889
commit 3ae9def10a
No known key found for this signature in database
GPG key ID: 1141A28608EC3217

View file

@ -215,7 +215,7 @@ final class Wall extends VKAPIRequestHandler
foreach($psts as $pst) {
$id = explode("_", $pst);
$post = (new PostsRepo)->getPostById(intval($id[0]), intval($id[1]));
if($post || !$post->isDeleted()) {
if($post && !$post->isDeleted()) {
$from_id = get_class($post->getOwner()) == "openvk\Web\Models\Entities\Club" ? $post->getOwner()->getId() * (-1) : $post->getOwner()->getId();
$attachments = [];
$repost = []; // чел высрал семь сигарет 😳 помянем 🕯