From bd11271621bd3759cfd194ed0119c0dc28155fd0 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Thu, 5 Mar 2026 14:57:28 +0100 Subject: update --- matrix-specification/Data/Room/Rooms.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'matrix-specification/Data/Room/Rooms.php') diff --git a/matrix-specification/Data/Room/Rooms.php b/matrix-specification/Data/Room/Rooms.php index 1a84608..4d2cdf6 100644 --- a/matrix-specification/Data/Room/Rooms.php +++ b/matrix-specification/Data/Room/Rooms.php @@ -21,17 +21,17 @@ class Rooms implements \JsonSerializable public function jsonSerialize(): array { return [ - "invite" => $this->invite ?? new \stdClass(), - "join" => $this->join ?? new \stdClass(), - "knock" => $this->knock ?? new \stdClass(), - "leave" => $this->leave ?? new \stdClass(), + "invite" => empty($this->invite) ? new \stdClass() : $this->invite, + "join" => empty($this->join) ? new \stdClass() : $this->join, + "knock" => empty($this->knock) ? new \stdClass() : $this->knock, + "leave" => empty($this->leave) ? new \stdClass() : $this->leave, ]; } /** * @return InvitedRoom[] */ - public function getInvite(): ?array + public function getInvited(): ?array { return $this->invite; } -- cgit v1.2.3