You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-05 23:10:41 +03:00
createRoom, only send join rule event if we have a join rule to put inside it
This commit is contained in:
@@ -184,7 +184,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({
|
createOpts.initial_state.push({
|
||||||
type: EventType.RoomJoinRules,
|
type: EventType.RoomJoinRules,
|
||||||
content: { join_rule: opts.joinRule },
|
content: { join_rule: opts.joinRule },
|
||||||
|
|||||||
Reference in New Issue
Block a user