summaryrefslogtreecommitdiff
path: root/matrix-specification/Responses/ClientAccountWhoamiGetResponse.php
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2025-12-13 16:27:53 +0100
committerDaniel Weipert <git@mail.dweipert.de>2025-12-13 16:27:53 +0100
commit2386148b8f048ba40d9f26cc97898bdcdc778ea2 (patch)
tree48ca45de3dc6133cb0225eba8c5917f813082b2b /matrix-specification/Responses/ClientAccountWhoamiGetResponse.php
parentb19a8f63ad727a3633885d3f2b81edf8181a53b9 (diff)
matrix specification splitHEADmain
Diffstat (limited to 'matrix-specification/Responses/ClientAccountWhoamiGetResponse.php')
-rw-r--r--matrix-specification/Responses/ClientAccountWhoamiGetResponse.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/matrix-specification/Responses/ClientAccountWhoamiGetResponse.php b/matrix-specification/Responses/ClientAccountWhoamiGetResponse.php
index 48fbbde..2f7ff81 100644
--- a/matrix-specification/Responses/ClientAccountWhoamiGetResponse.php
+++ b/matrix-specification/Responses/ClientAccountWhoamiGetResponse.php
@@ -2,7 +2,9 @@
namespace Matrix\Responses;
-class ClientAccountWhoamiGetResponse implements \JsonSerializable
+use Matrix\Response;
+
+class ClientAccountWhoamiGetResponse extends Response
{
public function __construct(
private string $userId,
@@ -11,12 +13,12 @@ class ClientAccountWhoamiGetResponse implements \JsonSerializable
)
{}
- public function jsonSerialize(): array
+ public function getBody(): array
{
return array_filter([
"device_id" => $this->deviceId,
"is_guest" => $this->isGuest,
"user_id" => $this->userId,
- ], "is_null");
+ ], fn ($value) => ! is_null($value));
}
}