Updated AddressBookGetContacts to return standard contact objects
This commit is contained in:
parent
83a47ddd5e
commit
57d5528b31
2 changed files with 49 additions and 4 deletions
|
@ -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));
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue