1
0
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:
Toby Zerner
2018-01-21 08:34:33 +10:30
parent e8103ad0b3
commit a390f7ca1b

View File

@@ -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;
}
}