Fix bad query in isVisibleTo

This commit is contained in:
Toby Zerner 2015-09-04 12:23:17 +09:30
parent b597e6f8f6
commit 8423de754c

View File

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