mirror of
https://github.com/flarum/framework.git
synced 2024-11-23 18:12:19 +08:00
Make sure the discussion is_approved attribute value is correct
This commit is contained in:
parent
e8103ad0b3
commit
a390f7ca1b
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user