fix: handle room code on join with code (#4427)
This commit is contained in:
parent
16ddaea9d5
commit
45a8711f0e
1 changed files with 6 additions and 3 deletions
|
|
@ -40,14 +40,17 @@ class CourseCodePageState extends State<CourseCodePage> {
|
|||
return;
|
||||
}
|
||||
|
||||
final spaceId = await MatrixState.pangeaController.spaceCodeController
|
||||
final roomId = await MatrixState.pangeaController.spaceCodeController
|
||||
.joinSpaceWithCode(
|
||||
context,
|
||||
_code,
|
||||
);
|
||||
|
||||
if (spaceId != null) {
|
||||
context.go('/rooms/spaces/$spaceId/details');
|
||||
if (roomId != null) {
|
||||
final room = Matrix.of(context).client.getRoomById(roomId);
|
||||
room?.isSpace ?? true
|
||||
? context.go('/rooms/spaces/$roomId/details')
|
||||
: context.go('/rooms/$roomId');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue