mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 09:41:49 +08:00
Use existing helper method
This commit is contained in:
parent
97e6049c8d
commit
9fdfb024dd
|
@ -22,7 +22,7 @@ class HideIgnoredDiscussions
|
|||
// might be better as `id IN (subquery)`?
|
||||
$actor = $event->search->getActor();
|
||||
$event->search->getQuery()->whereNotExists(function ($query) use ($actor) {
|
||||
$query->select(app('flarum.db')->raw(1))
|
||||
$query->selectRaw(1)
|
||||
->from('users_discussions')
|
||||
->whereRaw('discussion_id = discussions.id')
|
||||
->where('user_id', $actor->id)
|
||||
|
|
Loading…
Reference in New Issue
Block a user