Update LikeService, improve likedBy logic to soft fail on missing or deleted accounts

This commit is contained in:
Daniel Supernault 2023-05-08 22:47:59 -06:00
parent df444851b5
commit 91ba139808
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
1 changed files with 4 additions and 1 deletions

View File

@ -85,7 +85,10 @@ class LikeService {
return $empty;
}
$id = $like->profile_id;
$profile = ProfileService::get($id);
$profile = ProfileService::get($id, true);
if(!$profile) {
return [];
}
$profileUrl = "/i/web/profile/{$profile['id']}";
$res = [
'id' => (string) $profile['id'],