Kazv::Api::CreateRoomJob::StateEvent Struct Reference

Create a new room with various configuration options. More...

#include <create_room.hpp>

Collaboration diagram for Kazv::Api::CreateRoomJob::StateEvent:

Public Attributes

std::string type
 The type of event to send. More...
JsonWrap content
 The content of the event. More...
std::optional< std::string > stateKey
 The state_key of the state event. Defaults to an empty string. More...

Detailed Description

Create a new room with various configuration options.

The server MUST apply the normal state resolution rules when creating the new room, including checking power levels for each event. It MUST apply the events implied by the request in the following order:

  1. The event itself. Must be the first event in the room.
  2. An event for the creator to join the room. This is needed so the remaining events can be sent.
  3. A default event, giving the room creator (and not other members) permission to send state events. Overridden by the power_level_content_override parameter.
  4. An event if room_alias_name is given.
  5. Events set by the preset. Currently these are the,, and state events.
  6. Events listed in initial_state, in the order that they are listed.
  7. Events implied by name and topic ( and state events).
  8. Invite events implied by invite and invite_3pid ( with membership: invite and

The available presets do the following with respect to room state:

Preset join_rules history_visibility guest_access Other
private_chat invite shared can_join
trusted_private_chat invite shared can_join All invitees are given the same power level as the room creator.
public_chat public shared forbidden

The server will create a event in the room with the requesting user as the creator, alongside other keys provided in the creation_content.

Member Data Documentation

◆ content

JsonWrap Kazv::Api::CreateRoomJob::StateEvent::content

The content of the event.

◆ stateKey

std::optional<std::string> Kazv::Api::CreateRoomJob::StateEvent::stateKey

The state_key of the state event. Defaults to an empty string.

◆ type

std::string Kazv::Api::CreateRoomJob::StateEvent::type

The type of event to send.

The documentation for this struct was generated from the following file: