Refactor encryptionChannelExists method documentation and reposition it within SocialClient class

This commit is contained in:
netkas 2025-03-07 14:50:36 -05:00
parent 6580c2a748
commit 43b62ee1c9

View file

@ -546,23 +546,6 @@
)->getResponse()->getResult(); )->getResponse()->getResult();
} }
/**
* Checks if an encryption channel exists for the given channel UUID.
*
* @param string $channelUuid The UUID of the channel to check.
*
* @return bool True if an encryption channel exists, false otherwise.
* @throws RpcException Thrown if there was an error with the RPC request.
*/
public function encryptionChannelExists(string $channelUuid): bool
{
return $this->sendRequest(
new RpcRequest(StandardMethods::ENCRYPTION_CHANNEL_EXISTS, parameters: [
'channel_uuid' => $channelUuid
])
)->getResponse()->getResult();
}
/** /**
* Acknowledges an encrypted message in a specific channel. * Acknowledges an encrypted message in a specific channel.
* *
@ -594,7 +577,7 @@
} }
/** /**
* Acknowledges messages in an encryption channel. * Acknowledges multiple messages in an encryption channel by sending multiple requests at once
* *
* @param string $channelUuid The UUID of the encryption channel. * @param string $channelUuid The UUID of the encryption channel.
* @param array $messageUuids An array of message UUIDs to acknowledge. * @param array $messageUuids An array of message UUIDs to acknowledge.
@ -615,6 +598,23 @@
]), $messageUuids), $identifiedAs); ]), $messageUuids), $identifiedAs);
} }
/**
* Checks if an encryption channel exists for the given channel UUID.
*
* @param string $channelUuid The UUID of the channel to check.
*
* @return bool True if an encryption channel exists, false otherwise.
* @throws RpcException Thrown if there was an error with the RPC request.
*/
public function encryptionChannelExists(string $channelUuid): bool
{
return $this->sendRequest(
new RpcRequest(StandardMethods::ENCRYPTION_CHANNEL_EXISTS, parameters: [
'channel_uuid' => $channelUuid
])
)->getResponse()->getResult();
}
/** /**
* Rejects a message from the encryption channel * Rejects a message from the encryption channel
* *