From 3d9f5fc6b15151c4c34918f3d2157228223580d9 Mon Sep 17 00:00:00 2001 From: netkas Date: Tue, 25 Mar 2025 14:02:10 -0400 Subject: [PATCH] Improve logging in ContactManager to include relationship details and adjust relationship parameter handling in SocialClient --- src/Socialbox/Managers/ContactManager.php | 2 +- src/Socialbox/SocialClient.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Socialbox/Managers/ContactManager.php b/src/Socialbox/Managers/ContactManager.php index 0ed6815..af0d26b 100644 --- a/src/Socialbox/Managers/ContactManager.php +++ b/src/Socialbox/Managers/ContactManager.php @@ -101,7 +101,7 @@ } $uuid = UuidV4::v4()->toRfc4122(); - Logger::getLogger()->debug(sprintf('Creating new contact (%s) for %s as UUID %s', $contactAddress, $peerUuid, $uuid)); + Logger::getLogger()->debug(sprintf('Creating new contact (%s) for %s with a relationship of %s as UUID %s', $contactAddress, $peerUuid, $relationship->value, $uuid)); try { diff --git a/src/Socialbox/SocialClient.php b/src/Socialbox/SocialClient.php index adbdf52..e86b298 100644 --- a/src/Socialbox/SocialClient.php +++ b/src/Socialbox/SocialClient.php @@ -212,7 +212,7 @@ return (bool)$this->sendRequest( new RpcRequest(StandardMethods::ADDRESS_BOOK_ADD_CONTACT, parameters: [ 'peer' => $peer, - 'relationship' => $relationship?->value + 'relationship' => $relationship ]) )->getResponse()->getResult(); }