mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
Groups: Fix posting comments on behalf of the group
This commit is contained in:
parent
846510ef93
commit
e65d6231a1
1 changed files with 3 additions and 3 deletions
|
@ -1,8 +1,8 @@
|
||||||
<?php declare(strict_types=1);
|
<?php declare(strict_types=1);
|
||||||
namespace openvk\Web\Presenters;
|
namespace openvk\Web\Presenters;
|
||||||
use openvk\Web\Models\Entities\{Comment, Photo, Video, User, Topic};
|
use openvk\Web\Models\Entities\{Comment, Photo, Video, User, Topic, Post};
|
||||||
use openvk\Web\Models\Entities\Notifications\CommentNotification;
|
use openvk\Web\Models\Entities\Notifications\CommentNotification;
|
||||||
use openvk\Web\Models\Repositories\Comments;
|
use openvk\Web\Models\Repositories\{Comments, Clubs};
|
||||||
|
|
||||||
final class CommentPresenter extends OpenVKPresenter
|
final class CommentPresenter extends OpenVKPresenter
|
||||||
{
|
{
|
||||||
|
@ -42,7 +42,7 @@ final class CommentPresenter extends OpenVKPresenter
|
||||||
if($entity instanceof Topic && $entity->isClosed())
|
if($entity instanceof Topic && $entity->isClosed())
|
||||||
$this->notFound();
|
$this->notFound();
|
||||||
|
|
||||||
if($entity instanceof Post && $entity->getTargetWall() > 0)
|
if($entity instanceof Post && $entity->getTargetWall() < 0)
|
||||||
$club = (new Clubs)->get(abs($entity->getTargetWall()));
|
$club = (new Clubs)->get(abs($entity->getTargetWall()));
|
||||||
else if($entity instanceof Topic)
|
else if($entity instanceof Topic)
|
||||||
$club = $entity->getClub();
|
$club = $entity->getClub();
|
||||||
|
|
Loading…
Reference in a new issue