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

pull/4363/head
Daniel Supernault 2023-05-08 22:47:59 -06:00
rodzic df444851b5
commit 91ba139808
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0DEF1C662C9033F7
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -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'],