From b19a8f63ad727a3633885d3f2b81edf8181a53b9 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Thu, 25 Sep 2025 13:38:24 +0200 Subject: matrix-specification split work in progress --- .../Requests/ClientKeysUploadPostRequest.php | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 matrix-specification/Requests/ClientKeysUploadPostRequest.php (limited to 'matrix-specification/Requests/ClientKeysUploadPostRequest.php') diff --git a/matrix-specification/Requests/ClientKeysUploadPostRequest.php b/matrix-specification/Requests/ClientKeysUploadPostRequest.php new file mode 100644 index 0000000..40d9eae --- /dev/null +++ b/matrix-specification/Requests/ClientKeysUploadPostRequest.php @@ -0,0 +1,29 @@ + $fallbackKeys + * @param array $oneTimeKeys + */ + public function __construct( + private ?DeviceKeys $deviceKeys = null, + private ?array $fallbackKeys = null, + private ?array $oneTimeKeys = null, + ) + {} + + public function jsonSerialize(): array + { + return array_filter([ + "device_keys" => $this->deviceKeys, + "fallback_keys" => $this->fallbackKeys, + "one_time_keys" => $this->oneTimeKeys, + ], "is_null"); + } +} -- cgit v1.2.3