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

Commit

Permalink
createRoom, only send join rule event if we have a join rule to put i…
Browse files Browse the repository at this point in the history
…nside it
  • Loading branch information
t3chguy committed Jul 30, 2021
1 parent a7a84df commit f86265b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/createRoom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down

0 comments on commit f86265b

Please sign in to comment.