From 1b3829f62e509ecfd88e582a7975a743c404a7ff Mon Sep 17 00:00:00 2001 From: netkas Date: Mon, 3 Mar 2025 14:58:37 -0500 Subject: [PATCH] Implement encryption channel methods and refactor related classes --- .../EncryptionChannelExists.php | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/Socialbox/Classes/StandardMethods/EncryptionChannel/EncryptionChannelExists.php 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