Class

Space

Space()

An instance representing a Matrix Space. A space is tied to a room.
Constructor

# new Space()

View Source models/Spaces.ts, line 9

Classes

Space

Methods

# async addChildRoom(roomId, childOpts) → {Promise.<void>}

Adds a child room to the space. Must be joined to both the room and the space.
Parameters:
Name Type Description
roomId string The room ID to add.
childOpts SpaceChildEntityOptions Additional options for the child space.

View Source models/Spaces.ts, line 207

Resolves when complete.
Promise.<void>

# async addChildSpace(space, childOpts) → {Promise.<Space>}

Adds a child space to the space. Must be joined to both spaces.
Parameters:
Name Type Description
space Space The space to add.
childOpts SpaceChildEntityOptions Related options for the child's representation.

View Source models/Spaces.ts, line 188

Resolves when complete.
Promise.<Space>

# async createChildSpace(opts) → {Promise.<Space>}

Creates a new child space under this space.
Parameters:
Name Type Description
opts SpaceCreateOptions The options for the new space.

View Source models/Spaces.ts, line 178

Resolves to the created space.
Promise.<Space>

# async getChildEntities() → {Promise.<SpaceEntityMap>}

Gets all the child rooms on the space. These may be spaces or other rooms.

View Source models/Spaces.ts, line 224

Resolves to a map of children for this space.
Promise.<SpaceEntityMap>

# async inviteUser(userId) → {Promise.<void>}

Invite a user to the current space.
Parameters:
Name Type Description
userId string The user ID to invite.

View Source models/Spaces.ts, line 233

Resolves when completed.
Promise.<void>

# async removeChildRoom(roomId) → {Promise.<void>}

Removes a child room from the space. Must be joined to the current space (not needed for child room).
Parameters:
Name Type Description
roomId string The room ID to remove.

View Source models/Spaces.ts, line 216

Resolves when complete.
Promise.<void>

# async removeChildSpace(space) → {Promise.<void>}

Removes a child space from the space. Must be joined to the current space (not needed for child space).
Parameters:
Name Type Description
space Space The space to remove.

View Source models/Spaces.ts, line 197

Resolves when complete.
Promise.<void>