From 393598014669afd057248ff555db24ab5b1556f9 Mon Sep 17 00:00:00 2001 From: netkas Date: Thu, 20 Mar 2025 13:05:07 -0400 Subject: [PATCH] Refactor getSelf method to instantiate Peer directly from sendRequest response --- src/Socialbox/SocialClient.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Socialbox/SocialClient.php b/src/Socialbox/SocialClient.php index 87ad32e..858be14 100644 --- a/src/Socialbox/SocialClient.php +++ b/src/Socialbox/SocialClient.php @@ -398,9 +398,9 @@ */ public function getSelf(): Peer { - return $this->sendRequest( + return new Peer($this->sendRequest( new RpcRequest(StandardMethods::GET_SELF) - )->getResponse()->getResult(); + )->getResponse()->getResult()); } /**