Updated method AddressBookGetContact to return a full standard contact, improved standard contact object

This commit is contained in:
netkas 2025-01-30 19:51:37 -05:00
parent 4f1f0ce151
commit 83a47ddd5e
5 changed files with 333 additions and 6 deletions

View file

@ -43,13 +43,11 @@
return $rpcRequest->produceError(StandardError::NOT_FOUND, 'Contact does not exist');
}
$contact = ContactManager::getContact($request->getPeer(), $address);
$rpcRequest->produceResponse(ContactManager::getStandardContact($request->getPeer(), $address));
}
catch(DatabaseOperationException $e)
{
throw new StandardRpcException('Failed to get contact', StandardError::INTERNAL_SERVER_ERROR, $e);
}
return $rpcRequest->produceResponse($contact->toStandard());
}
}