Defer auto-joining within spaces and switch to using suggested

This commit is contained in:
Michael Telatynski 2021-03-04 13:04:58 +00:00
parent d9a801910a
commit ab4220b20d
3 changed files with 20 additions and 18 deletions

View file

@ -108,9 +108,10 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
}
}
public addRoomToSpace(space: Room, roomId: string, via: string[], autoJoin = false) {
public addRoomToSpace(space: Room, roomId: string, via: string[], suggested = false, autoJoin = false) {
return this.matrixClient.sendStateEvent(space.roomId, EventType.SpaceChild, {
via,
suggested,
auto_join: autoJoin,
}, roomId);
}