summaryrefslogtreecommitdiff
path: root/matrix-specification/Responses/ClientSyncGetResponse.php
diff options
context:
space:
mode:
Diffstat (limited to 'matrix-specification/Responses/ClientSyncGetResponse.php')
-rw-r--r--matrix-specification/Responses/ClientSyncGetResponse.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/matrix-specification/Responses/ClientSyncGetResponse.php b/matrix-specification/Responses/ClientSyncGetResponse.php
index ccdc5e6..dbe2a29 100644
--- a/matrix-specification/Responses/ClientSyncGetResponse.php
+++ b/matrix-specification/Responses/ClientSyncGetResponse.php
@@ -7,8 +7,9 @@ use Matrix\Data\DeviceLists;
use Matrix\Data\Presence;
use Matrix\Data\Room\Rooms;
use Matrix\Data\ToDevice;
+use Matrix\Response;
-class ClientSyncGetResponse implements \JsonSerializable
+class ClientSyncGetResponse extends Response
{
/**
* @param array<string, int> $deviceOneTimeKeysCount
@@ -24,7 +25,7 @@ class ClientSyncGetResponse implements \JsonSerializable
)
{}
- public function jsonSerialize(): array
+ public function getBody(): array
{
return array_filter([
"account_data" => $this->accountData,
@@ -34,6 +35,6 @@ class ClientSyncGetResponse implements \JsonSerializable
"presence" => $this->presence,
"rooms" => $this->rooms,
"to_device" => $this->toDevice,
- ], "is_null");
+ ], fn ($value) => ! is_null($value));
}
}