Refactor EncryptionGetChannel to remove UUID validation and cast channel_uuid to string
https://github.com/nosial/Socialbox-PHP/issues/22
This commit is contained in:
parent
b0ce6109d7
commit
c5d0e185c3
1 changed files with 1 additions and 5 deletions
|
@ -26,15 +26,11 @@
|
|||
{
|
||||
throw new MissingRpcArgumentException('channel_uuid');
|
||||
}
|
||||
elseif(!Validator::validateUuid($rpcRequest->getParameter('channel_uuid')))
|
||||
{
|
||||
throw new InvalidRpcArgumentException('channel_uuid', 'The given channel uuid is not a valid UUID V4');
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$requestingPeer = $request->getPeer();
|
||||
$encryptionChannel = EncryptionChannelManager::getChannel($rpcRequest->getParameter('channel_uuid'));
|
||||
$encryptionChannel = EncryptionChannelManager::getChannel((string)$rpcRequest->getParameter('channel_uuid'));
|
||||
}
|
||||
catch(DatabaseOperationException $e)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue