Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit fe2993e

Browse files
authored
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
2 parents a7a84df + f86265b commit fe2993e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/createRoom.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ export default async function createRoom(opts: IOpts): Promise<string | null> {
169169
}
170170
}
171171

172-
if (opts.joinRule !== JoinRule.Restricted) {
172+
// we handle the restricted join rule in the parentSpace handling block above
173+
if (opts.joinRule && opts.joinRule !== JoinRule.Restricted) {
173174
createOpts.initial_state.push({
174175
type: EventType.RoomJoinRules,
175176
content: { join_rule: opts.joinRule },

0 commit comments

Comments
 (0)