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

Commit f86265b

Browse files
committed
createRoom, only send join rule event if we have a join rule to put inside it
1 parent a7a84df commit f86265b

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)