Skip to content

Commit dc1362b

Browse files
committed
dont override sending to the correct url and move our code to run only when no session exists
1 parent a1e8b6c commit dc1362b

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

frontend/iframe/viewmodels/RootViewModel.ts

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -165,27 +165,26 @@ export class RootViewModel extends ViewModel<SegmentType, Options> {
165165
this._showLogin(loginToken);
166166
}
167167
} else {
168-
if (this._singleRoomIdOrAlias) {
169-
// No active session but we're in single-room mode.
170-
if (!this._resolvedSingleRoomId) {
171-
try {
172-
this._resolvedSingleRoomId = await this.resolveRoomAlias(this._singleRoomIdOrAlias);
173-
} catch (error) {
174-
console.warn(error);
175-
}
176-
}
177-
178-
if (this._resolvedSingleRoomId) {
179-
await this._showUnknownRoom(this._resolvedSingleRoomId);
180-
return;
181-
}
182-
}
183-
184168
try {
185169
if (!(shouldRestoreLastUrl && this.urlRouter.tryRestoreLastUrl())) {
186170
const sessionInfos = await this.platform.sessionInfoStorage.getAll();
187171
if (sessionInfos.length === 0) {
188-
this.navigation.push(Section.Login);
172+
if (this._singleRoomIdOrAlias) {
173+
// No active session but we're in single-room mode.
174+
if (!this._resolvedSingleRoomId) {
175+
try {
176+
this._resolvedSingleRoomId = await this.resolveRoomAlias(this._singleRoomIdOrAlias);
177+
} catch (error) {
178+
console.warn(error);
179+
}
180+
}
181+
182+
if (this._resolvedSingleRoomId) {
183+
await this._showUnknownRoom(this._resolvedSingleRoomId);
184+
}
185+
} else {
186+
this.navigation.push(Section.Login);
187+
}
189188
} else if (sessionInfos.length === 1) {
190189
this.navigation.push(Section.Session, sessionInfos[0].id);
191190
} else {

0 commit comments

Comments
 (0)