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 --- matrix-specification/Data/DiscoveryInformation.php | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 matrix-specification/Data/DiscoveryInformation.php (limited to 'matrix-specification/Data/DiscoveryInformation.php') diff --git a/matrix-specification/Data/DiscoveryInformation.php b/matrix-specification/Data/DiscoveryInformation.php new file mode 100644 index 0000000..42a3dc2 --- /dev/null +++ b/matrix-specification/Data/DiscoveryInformation.php @@ -0,0 +1,30 @@ +> $otherProperties + */ + public function __construct( + private HomeServerInformation $homeServerInformation, + private IdentityServerInformation $identityServerInformation, + private ?array $otherProperties = null, + ) + {} + + public function jsonSerialize(): array + { + return array_filter( + array_merge( + [ + "m.homeserver" => $this->homeServerInformation, + "m.identity_server" => $this->identityServerInformation, + ], + $this->otherProperties ?? [], + ), + "is_null" + ); + } +} -- cgit v1.2.3