mtx::events::state::space::Parent struct

Event to point at a parent space from a room or space.

To avoid abuse where a room admin falsely claims that a room is part of a space that it should not be, clients could ignore such m.space.parent events unless either (a) there is a corresponding m.space.child event in the claimed parent, or (b) the sender of the m.space.child event has a sufficient power-level to send such an m.space.child event in the parent. (It is not necessarily required that that user currently be a member of the parent room - only the m.room.power_levels event is inspected.)

Public variables

std::optional<std::vector<std::string>> via
Servers to join the parent space via.
bool canonical
Determines whether this is the main parent for the space.

Variable documentation

std::optional<std::vector<std::string>> mtx::events::state::space::Parent::via

Servers to join the parent space via.

Needs to contain at least one server.

bool mtx::events::state::space::Parent::canonical

Determines whether this is the main parent for the space.

When a user joins a room with a canonical parent, clients may switch to view the room in the context of that space, peeking into it in order to find other rooms and group them together. In practice, well behaved rooms should only have one canonical parent, but given this is not enforced: if multiple are present the client should select the one with the lowest room ID, as determined via a lexicographic ordering of the Unicode code-points.