Added the method AddressBookGetContact and minor improvements in other implementations
This commit is contained in:
parent
e2a0e2f27f
commit
aba9adf916
4 changed files with 62 additions and 8 deletions
|
@ -52,12 +52,7 @@
|
|||
throw new StandardException('Failed to get contacts', StandardError::INTERNAL_SERVER_ERROR, $e);
|
||||
}
|
||||
|
||||
$results = [];
|
||||
foreach($contacts as $contact)
|
||||
{
|
||||
$results[] = $contact->toStandard();
|
||||
}
|
||||
|
||||
return $rpcRequest->produceResponse($results);
|
||||
return $rpcRequest->produceResponse(array_map(function($contact) {return $contact->toStandard();}, $contacts));
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue