mirror of
https://github.com/flarum/framework.git
synced 2024-12-02 23:23:52 +08:00
parent
d9037fe472
commit
278bbd992b
|
@ -191,7 +191,7 @@ class Notification extends AbstractModel
|
|||
*/
|
||||
public function scopeWhereSubjectModel(Builder $query, string $class)
|
||||
{
|
||||
$notificationTypes = array_filter(Notification::getSubjectModels(), function ($modelClass) use ($class) {
|
||||
$notificationTypes = array_filter(self::getSubjectModels(), function ($modelClass) use ($class) {
|
||||
return $modelClass === $class or is_subclass_of($class, $modelClass);
|
||||
});
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@ use Flarum\Database\AbstractModel;
|
|||
use Flarum\Database\ScopeVisibilityTrait;
|
||||
use Flarum\Discussion\Discussion;
|
||||
use Flarum\Event\GetModelIsPrivate;
|
||||
use Flarum\Event\ScopeModelVisibility;
|
||||
use Flarum\Foundation\EventGeneratorTrait;
|
||||
use Flarum\Notification\Notification;
|
||||
use Flarum\Post\Event\Deleted;
|
||||
|
|
Loading…
Reference in New Issue
Block a user