mirror of
https://github.com/flarum/core.git
synced 2025-07-25 10:41:24 +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)
|
||||
{
|
||||
if ($event->isModel(Post::class)) {
|
||||
if ($event->isModel(Post::class) || $event->isModel(Discussion::class)) {
|
||||
$event->attributes['is_approved'] = true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user