Use correct route when join class by link (#3528)
This commit is contained in:
parent
a24e00cc21
commit
4105459b73
1 changed files with 11 additions and 2 deletions
|
|
@ -150,7 +150,12 @@ class ClassController extends BaseController {
|
|||
);
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
@ -206,7 +211,11 @@ class ClassController extends BaseController {
|
|||
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;
|
||||
} catch (e, s) {
|
||||
ErrorHandler.logError(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue