Merge pull request #6517 from matrix-org/t3chguy/cp/6516

[Release] createRoom, only send join rule event if we have a join rule to put in it
pull/21833/head
Michael Telatynski 2021-07-30 15:31:09 +01:00 committed by GitHub
commit fe2993ef7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -169,7 +169,8 @@ export default async function createRoom(opts: IOpts): Promise<string | null> {
}
}
if (opts.joinRule !== JoinRule.Restricted) {
// we handle the restricted join rule in the parentSpace handling block above
if (opts.joinRule && opts.joinRule !== JoinRule.Restricted) {
createOpts.initial_state.push({
type: EventType.RoomJoinRules,
content: { join_rule: opts.joinRule },