Updated logic

This commit is contained in:
netkas 2025-01-30 00:34:05 -05:00
parent 06b55a65b6
commit 831f6cc8e2

View file

@ -20,7 +20,8 @@
class AddressBookAddContact extends Method
{
/**
* Adds a contact to the authenticated peer's address book
* Adds a contact to the authenticated peer's address book, returns True if the contact was added
* false if the contact already exists.
*
* @inheritDoc
*/
@ -67,7 +68,7 @@
// Check if the contact already exists
if(ContactManager::isContact($peer, $address))
{
return $rpcRequest->produceError(StandardError::FORBIDDEN, 'Contact already exists');
return $rpcRequest->produceResponse(false);
}
// Create the contact