Interface

RoomCreateOptions

RoomCreateOptions

The options available when creating a room.

View Source models/CreateRoom.ts, line 32

Members

Omit.<CreateEventContent, "creator">

# creation_content Optional

Extra keys, such as m.federate, to be added to the content of the m.room.create event. The server will overwrite the following keys: `creator`, `room_version`. Future versions of the specification may allow the server to overwrite other keys.

View Source models/CreateRoom.ts, line 37

Array

# initial_state Optional

A list of state events to set in the new room. This allows the user to override the default state events set in the new room. The expected format of the state events are an object with `type`, `state_key` and `content` keys set. Takes precedence over events set by `preset`, but gets overridden by `name` and `topic` keys.
Properties:
Name Type Attributes Description
] any The content of the event.
[].state_key string <optional>
The state_key of the state event. Defaults to an empty string.
] string The type of event to send.

View Source models/CreateRoom.ts, line 45

Array

# invite Optional

A list of user IDs to invite to the room. This will tell the server to invite everyone in the list to the newly created room.

View Source models/CreateRoom.ts, line 57

boolean

# is_direct Optional

This flag makes the server set the `is_direct` flag on the `m.room.member` events sent to the users in `invite` and `invite_3pid`.

View Source models/CreateRoom.ts, line 63

string

# name Optional

If this is included, an `m.room.name` event will be sent into the room to indicate the name of the room.

View Source models/CreateRoom.ts, line 69

PowerLevelsEventContent

# power_level_content_override Optional

The power level content to override in the default power level event. This object is applied on top of the generated `m.room.power_levels` event content prior to it being sent to the room. Defaults to overriding nothing.

View Source models/CreateRoom.ts, line 75

RoomPreset

# preset Optional

Convenience parameter for setting various default state events based on a preset. If unspecified, the server should use the `visibility` to determine which preset to use. A visbility of `public` equates to a preset of `public_chat` and `private` visibility equates to a preset of `private_chat`.

View Source models/CreateRoom.ts, line 83

string

# room_alias_name Optional

The desired room alias local part. If this is included, a room alias will be created and mapped to the newly created room. The alias will belong on the same homeserver which created the room.

View Source models/CreateRoom.ts, line 92

string

# room_version Optional

The room version to set for the room. If not provided, the homeserver is to use its configured default. If provided, the homeserver will return a `400` error with the errcode `M_UNSUPPORTED_ROOM_VERSION` if it does not support the room version.

View Source models/CreateRoom.ts, line 100

string

# topic Optional

If this is included, an `m.room.topic` event will be sent into the room to indicate the topic for the room.

View Source models/CreateRoom.ts, line 108

RoomVisibility

# visibility Optional

Sets the visibility of the room Rooms default to private visibility if this key is not included.

View Source models/CreateRoom.ts, line 114