mirror of
https://github.com/vector-im/element-web.git
synced 2026-02-08 09:11:41 +01:00
createRoom, only send join rule event if we have a join rule to put inside it
This commit is contained in:
parent
a7a84df49c
commit
f86265bd03
@ -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 },
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user