Updated AddressBookGetContacts to return standard contact objects

This commit is contained in:
netkas 2025-01-30 19:54:27 -05:00
parent 83a47ddd5e
commit 57d5528b31
2 changed files with 49 additions and 4 deletions

View file

@ -46,14 +46,11 @@
try
{
$contacts = ContactManager::getContacts($request->getPeer(), $limit, $page);
return $rpcRequest->produceResponse(ContactManager::getStandardContacts($request->getPeer(), $limit, $page));
}
catch(DatabaseOperationException $e)
{
throw new StandardRpcException('Failed to get contacts', StandardError::INTERNAL_SERVER_ERROR, $e);
}
return $rpcRequest->produceResponse(array_map(function($contact) {return $contact->toStandard();}, $contacts));
}
}