fix: handle room code on join with code (#4427)

This commit is contained in:
ggurdin 2025-10-16 10:22:56 -04:00 committed by GitHub
parent 16ddaea9d5
commit 45a8711f0e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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');
}
}