From 45a8711f0e9728232585364325d6795e765379d3 Mon Sep 17 00:00:00 2001 From: ggurdin <46800240+ggurdin@users.noreply.github.com> Date: Thu, 16 Oct 2025 10:22:56 -0400 Subject: [PATCH] fix: handle room code on join with code (#4427) --- lib/pangea/login/pages/course_code_page.dart | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/pangea/login/pages/course_code_page.dart b/lib/pangea/login/pages/course_code_page.dart index 026b0969a..1a976f54f 100644 --- a/lib/pangea/login/pages/course_code_page.dart +++ b/lib/pangea/login/pages/course_code_page.dart @@ -40,14 +40,17 @@ class CourseCodePageState extends State { 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'); } }