// Matrix Construct // // Copyright (C) Matrix Construct Developers, Authors & Contributors // Copyright (C) 2016-2018 Jason Volk // // Permission to use, copy, modify, and/or distribute this software for any // purpose with or without fee is hereby granted, provided that the above // copyright notice and this permission notice is present in all copies. The // full license for this software is available in the LICENSE file. #pragma once #define HAVE_IRCD_M_CREATEROOM_H namespace ircd::m { struct createroom; } struct ircd::m::createroom :json::tuple < /// A public visibility indicates that the room will be shown in the /// published room list. A private visibility will hide the room from /// the published room list. Rooms default to private visibility if this /// key is not included. NB: This should not be confused with join_rules /// which also uses the word public. One of: ["public", "private"] json::property, /// 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. For example, if /// this was set to "foo" and sent to the homeserver "example.com" the /// complete room alias would be #foo:example.com. json::property, /// If this is included, an m.room.name event will be sent into the room /// to indicate the name of the room. See Room Events for more information /// on m.room.name. json::property, /// If this is included, an m.room.topic event will be sent into the room to /// indicate the topic for the room. See Room Events for more information on /// m.room.topic. json::property, /// 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. json::property, /// A list of objects representing third party IDs to invite into the room. json::property, /// Extra keys to be added to the content of the m.room.create. The server /// will clobber the following keys: creator. Future versions of the /// specification may allow the server to clobber other keys. json::property, /// 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 presets, but gets overriden /// by name and topic keys. json::property, /// Convenience parameter for setting various default state events based on /// a preset. Must be either: private_chat => join_rules is set to invite. /// history_visibility is set to shared. trusted_private_chat => join_rules /// is set to invite. history_visibility is set to shared. All invitees are /// given the same power level as the room creator. public_chat: => /// join_rules is set to public. history_visibility is set to shared. One /// of: ["private_chat", "public_chat", "trusted_private_chat"] json::property, /// 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. See Direct /// Messaging for more information. json::property, /// Allows guests to join the room. See Guest Access for more information. /// /// developer note: this is false if undefined, but an m.room.guest_access /// may be present in the initial vector which allows guest access. This is /// only meaningful if and only if true. json::property, /// 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. json::property, /// (non-spec) Manually specify the room_id rather than generating one for /// this room. This is intended for privileged users only and will not be /// honored otherwise. json::property, /// (non-spec) A room_id to be referenced as a "parent" room. json::property, /// (non-spec) Manually specify the room creator. This is an interface /// convenience and will be overwritten/ignored from unprivileged users. json::property, /// (non-spec) Manually specify a room version string (ignored from /// unprivileged users/clients). json::property > { static std::array spec_presets; static conf::item version_default; static bool spec_preset(const string_view &); using super_type::tuple; };