Merge pull request #353 from pixelfed/frontend-ui-refactor

Update Status model
This commit is contained in:
daniel 2018-08-10 01:06:46 -06:00 committed by GitHub
commit 9dba310f2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -92,6 +92,9 @@ class Status extends Model
public function bookmarked() public function bookmarked()
{ {
if(!Auth::check()) {
return 0;
}
$profile = Auth::user()->profile; $profile = Auth::user()->profile;
return Bookmark::whereProfileId($profile->id)->whereStatusId($this->id)->count(); return Bookmark::whereProfileId($profile->id)->whereStatusId($this->id)->count();
} }