mirror of
https://github.com/flarum/core.git
synced 2025-07-26 03:01:22 +02:00
Make sure the discussion is_approved attribute value is correct
This commit is contained in:
@@ -36,7 +36,7 @@ class UnapproveNewContent
|
|||||||
*/
|
*/
|
||||||
public function approveByDefault(ConfigureModelDefaultAttributes $event)
|
public function approveByDefault(ConfigureModelDefaultAttributes $event)
|
||||||
{
|
{
|
||||||
if ($event->isModel(Post::class)) {
|
if ($event->isModel(Post::class) || $event->isModel(Discussion::class)) {
|
||||||
$event->attributes['is_approved'] = true;
|
$event->attributes['is_approved'] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user