diff options
| author | Daniel Weipert <git@mail.dweipert.de> | 2026-03-05 14:57:28 +0100 |
|---|---|---|
| committer | Daniel Weipert <git@mail.dweipert.de> | 2026-03-05 14:57:28 +0100 |
| commit | bd11271621bd3759cfd194ed0119c0dc28155fd0 (patch) | |
| tree | 319b4790d4e2b05513abf023732ed6fb0717f603 /matrix-specification/Data/Room/Rooms.php | |
| parent | 2386148b8f048ba40d9f26cc97898bdcdc778ea2 (diff) | |
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; } |
