diff --git a/src/Socialbox/Classes/StandardMethods/EncryptionChannel/EncryptionChannelExists.php b/src/Socialbox/Classes/StandardMethods/EncryptionChannel/EncryptionChannelExists.php new file mode 100644 index 0000000..23a5f8e --- /dev/null +++ b/src/Socialbox/Classes/StandardMethods/EncryptionChannel/EncryptionChannelExists.php @@ -0,0 +1,37 @@ +containsParameter('channel_uuid')) + { + throw new MissingRpcArgumentException('channel_uuid'); + } + + try + { + return $rpcRequest->produceResponse(EncryptionChannelManager::channelUuidExists($rpcRequest->getParameter('channel_uuid'))); + } + catch (DatabaseOperationException $e) + { + throw new StandardRpcException('An error occurred while checking if the channel exists', StandardError::INTERNAL_SERVER_ERROR, $e); + } + } + } \ No newline at end of file