mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 12:28:50 +03:00
Merge pull request #6714 from matrix-org/t3chguy/fix/18760
Only make the initial space rooms suggested by default
This commit is contained in:
commit
7d74cfecda
2 changed files with 4 additions and 1 deletions
|
@ -519,6 +519,7 @@ const SpaceSetupFirstRooms = ({ space, title, description, onFinished }) => {
|
||||||
inlineErrors: true,
|
inlineErrors: true,
|
||||||
parentSpace: space,
|
parentSpace: space,
|
||||||
joinRule: !isPublic ? JoinRule.Restricted : undefined,
|
joinRule: !isPublic ? JoinRule.Restricted : undefined,
|
||||||
|
suggested: true,
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
onFinished(filteredRoomNames.length > 0);
|
onFinished(filteredRoomNames.length > 0);
|
||||||
|
|
|
@ -62,6 +62,8 @@ export interface IOpts {
|
||||||
roomType?: RoomType | string;
|
roomType?: RoomType | string;
|
||||||
historyVisibility?: HistoryVisibility;
|
historyVisibility?: HistoryVisibility;
|
||||||
parentSpace?: Room;
|
parentSpace?: Room;
|
||||||
|
// contextually only makes sense if parentSpace is specified, if true then will be added to parentSpace as suggested
|
||||||
|
suggested?: boolean;
|
||||||
joinRule?: JoinRule;
|
joinRule?: JoinRule;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,7 +230,7 @@ export default async function createRoom(opts: IOpts): Promise<string | null> {
|
||||||
}
|
}
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
if (opts.parentSpace) {
|
if (opts.parentSpace) {
|
||||||
return SpaceStore.instance.addRoomToSpace(opts.parentSpace, roomId, [client.getDomain()], true);
|
return SpaceStore.instance.addRoomToSpace(opts.parentSpace, roomId, [client.getDomain()], opts.suggested);
|
||||||
}
|
}
|
||||||
if (opts.associatedWithCommunity) {
|
if (opts.associatedWithCommunity) {
|
||||||
return GroupStore.addRoomToGroup(opts.associatedWithCommunity, roomId, false);
|
return GroupStore.addRoomToGroup(opts.associatedWithCommunity, roomId, false);
|
||||||
|
|
Loading…
Reference in a new issue