Use correct route when join class by link (#3528)

pull/2245/head
Kelrap 4 months ago committed by GitHub
parent a24e00cc21
commit 4105459b73
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -150,7 +150,12 @@ class ClassController extends BaseController {
); );
if (alreadyJoined.isNotEmpty || inFoundClass) { if (alreadyJoined.isNotEmpty || inFoundClass) {
context.go("/rooms?spaceId=${alreadyJoined.first}"); final room = client.getRoomById(alreadyJoined.first);
if (!(room?.isSpace ?? true)) {
context.go("/rooms/${alreadyJoined.first}");
} else {
context.go("/rooms?spaceId=${alreadyJoined.first}");
}
return null; return null;
} }
@ -206,7 +211,11 @@ class ClassController extends BaseController {
await room.requestParticipants(); await room.requestParticipants();
} }
context.go("/rooms?spaceId=${room.id}"); if (room.isSpace) {
context.go("/rooms?spaceId=${room.id}");
} else {
context.go("/rooms/${room.id}");
}
return spaceID; return spaceID;
} catch (e, s) { } catch (e, s) {
ErrorHandler.logError( ErrorHandler.logError(

Loading…
Cancel
Save