mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 06:50:36 +08:00
Fix bad query in isVisibleTo
This commit is contained in:
parent
b597e6f8f6
commit
8423de754c
|
@ -120,7 +120,7 @@ class Post extends Model
|
|||
if ($discussion) {
|
||||
$this->setRelation('discussion', $discussion);
|
||||
|
||||
return (bool) $discussion->postsVisibleTo($user)->find($this->id)->count();
|
||||
return (bool) $discussion->postsVisibleTo($user)->where('id', $this->id)->count();
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue
Block a user