mirror of
https://github.com/openvk/openvk
synced 2024-12-23 00:51:03 +03:00
Fixup "Groups: Discussions"
Just forgot to add these two files to the commit :3
This commit is contained in:
parent
356c782f74
commit
e3a4c34574
2 changed files with 12 additions and 2 deletions
|
@ -130,6 +130,11 @@ class Club extends RowModel
|
|||
return $this->getRecord()->administrators_list_display;
|
||||
}
|
||||
|
||||
function isEveryoneCanCreateTopics(): bool
|
||||
{
|
||||
return (bool) $this->getRecord()->everyone_can_create_topics;
|
||||
}
|
||||
|
||||
function getType(): int
|
||||
{
|
||||
return $this->getRecord()->type;
|
||||
|
|
|
@ -34,8 +34,13 @@ class Comment extends Post
|
|||
*/
|
||||
function getOwner(bool $honourFlags = true, bool $real = false): RowModel
|
||||
{
|
||||
if($honourFlags && $this->isPostedOnBehalfOfGroup() && $this->getTarget() instanceof Post)
|
||||
return (new Clubs)->get(abs($this->getTarget()->getTargetWall()));
|
||||
if($honourFlags && $this->isPostedOnBehalfOfGroup()) {
|
||||
if($this->getTarget() instanceof Post)
|
||||
return (new Clubs)->get(abs($this->getTarget()->getTargetWall()));
|
||||
|
||||
if($this->getTarget() instanceof Topic)
|
||||
return $this->getTarget()->getClub();
|
||||
}
|
||||
|
||||
return parent::getOwner($honourFlags, $real);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue