mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
Update LikeService, fix authentication bug
This commit is contained in:
parent
3b4add7b8e
commit
c9abd70e8a
1 changed files with 1 additions and 1 deletions
|
@ -76,7 +76,7 @@ class LikeService {
|
|||
'others' => $status->likes_count >= 5,
|
||||
];
|
||||
|
||||
if(request()->user()->profile_id == $status->profile_id) {
|
||||
if(request()->user() && request()->user()->profile_id == $status->profile_id) {
|
||||
$res['total_count'] = $status->likes_count;
|
||||
$res['total_count_pretty'] = number_format($res['total_count']);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue