mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-14 02:24:31 +00:00
Update LikeService, improve likedBy logic to soft fail on missing or deleted accounts
This commit is contained in:
parent
df444851b5
commit
91ba139808
1 changed files with 4 additions and 1 deletions
|
@ -85,7 +85,10 @@ class LikeService {
|
||||||
return $empty;
|
return $empty;
|
||||||
}
|
}
|
||||||
$id = $like->profile_id;
|
$id = $like->profile_id;
|
||||||
$profile = ProfileService::get($id);
|
$profile = ProfileService::get($id, true);
|
||||||
|
if(!$profile) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
$profileUrl = "/i/web/profile/{$profile['id']}";
|
$profileUrl = "/i/web/profile/{$profile['id']}";
|
||||||
$res = [
|
$res = [
|
||||||
'id' => (string) $profile['id'],
|
'id' => (string) $profile['id'],
|
||||||
|
|
Loading…
Reference in a new issue