mirror of
https://github.com/flarum/core.git
synced 2025-08-03 23:17:43 +02:00
Change API attribute for hiding/restoring posts
This commit is contained in:
@@ -8,7 +8,7 @@ class EditPostCommand
|
|||||||
|
|
||||||
public $content;
|
public $content;
|
||||||
|
|
||||||
public $hidden;
|
public $isHidden;
|
||||||
|
|
||||||
public function __construct($postId, $user)
|
public function __construct($postId, $user)
|
||||||
{
|
{
|
||||||
|
@@ -28,9 +28,9 @@ class EditPostCommandHandler implements CommandHandler
|
|||||||
$post->revise($command->content, $user);
|
$post->revise($command->content, $user);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($command->hidden === true) {
|
if ($command->isHidden === true) {
|
||||||
$post->hide($user);
|
$post->hide($user);
|
||||||
} elseif ($command->hidden === false) {
|
} elseif ($command->isHidden === false) {
|
||||||
$post->restore($user);
|
$post->restore($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user