diff options
Diffstat (limited to 'matrix-specification/Data/Room/Rooms.php')
| -rw-r--r-- | matrix-specification/Data/Room/Rooms.php | 10 |
1 files changed, 5 insertions, 5 deletions
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; } |
