Updated VerificationGetImageCaptcha to return the new object

This commit is contained in:
netkas 2025-01-29 15:27:09 -05:00
parent c2330b374a
commit 3fe2d9e0df

View file

@ -12,7 +12,7 @@
use Socialbox\Managers\CaptchaManager; use Socialbox\Managers\CaptchaManager;
use Socialbox\Objects\ClientRequest; use Socialbox\Objects\ClientRequest;
use Socialbox\Objects\RpcRequest; use Socialbox\Objects\RpcRequest;
use Socialbox\Objects\Standard\ImageCaptcha; use Socialbox\Objects\Standard\ImageCaptchaVerification;
class VerificationGetImageCaptcha extends Method class VerificationGetImageCaptcha extends Method
{ {
@ -59,7 +59,7 @@
// Build the captcha // Build the captcha
// Returns HTML base64 encoded image of the captcha // Returns HTML base64 encoded image of the captcha
// Important note: Must always be HTML-BASE64 which means it must be prefixed with `data:image/jpeg;base64,` // Important note: Must always be HTML-BASE64 which means it must be prefixed with `data:image/jpeg;base64,`
return $rpcRequest->produceResponse(new ImageCaptcha([ return $rpcRequest->produceResponse(new ImageCaptchaVerification([
'expires' => $captchaRecord->getExpires(), 'expires' => $captchaRecord->getExpires(),
'content' => (new CaptchaBuilder($answer))->build()->inline() 'content' => (new CaptchaBuilder($answer))->build()->inline()
])); ]));