1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-24 00:35:59 +00:00

Update LikeService, fix authentication bug

This commit is contained in:
Daniel Supernault 2021-05-14 17:15:08 -06:00
parent 3b4add7b8e
commit c9abd70e8a
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -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']);
}