Allow creating knock rooms (#11182)

Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>
This commit is contained in:
Charly Nguyen
2023-07-10 08:01:03 +00:00
committed by GitHub
parent 01bd80fe59
commit fd749172e1
13 changed files with 197 additions and 3 deletions
+4
View File
@@ -222,6 +222,10 @@ export default async function createRoom(client: MatrixClient, opts: IOpts): Pro
});
}
if (opts.joinRule === JoinRule.Knock) {
createOpts.room_version = PreferredRoomVersions.KnockRooms;
}
if (opts.parentSpace) {
createOpts.initial_state.push(makeSpaceParentEvent(opts.parentSpace, true));
if (!opts.historyVisibility) {