includeRedundantMembers ??= false; $this->lazyLoadMembers ??= false; $this->unreadThreadNotifications ??= false; } public function jsonSerialize(): array { return parent::jsonSerialize() + array_filter([ "contains_url" => $this->containsUrl, "include_redundant_members" => $this->includeRedundantMembers, "lazy_load_members" => $this->lazyLoadMembers, "not_rooms" => $this->notRooms, "rooms" => $this->rooms, "unread_thread_notifications" => $this->unreadThreadNotifications, ], fn ($value) => ! is_null($value)); } }