mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
Fixed last check
This commit is contained in:
parent
302131c447
commit
f5dacb4e42
@ -205,14 +205,15 @@ export class RoomViewModel extends ViewModel {
|
|||||||
await roomStatusObserver.waitFor(status => status === RoomStatus.Joined);
|
await roomStatusObserver.waitFor(status => status === RoomStatus.Joined);
|
||||||
this.navigation.push("room", roomId);
|
this.navigation.push("room", roomId);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if ((exc.statusCode ?? exc.status) === 400) {
|
let exc;
|
||||||
const exc = new Error(`/join : '${roomName}' was not legal room ID or room alias`);
|
if ((err.statusCode ?? err.status) === 400) {
|
||||||
} else if ((exc.statusCode ?? exc.status) === 404 || (exc.statusCode ?? exc.status) === 502 || exc.message == "Internal Server Error") {
|
exc = new Error(`/join : '${roomName}' was not legal room ID or room alias`);
|
||||||
const exc = new Error(`/join : room '${roomName}' not found`);
|
} else if ((err.statusCode ?? err.status) === 404 || (err.statusCode ?? err.status) === 502 || err.message == "Internal Server Error") {
|
||||||
} else if ((exc.statusCode ?? exc.status) === 403) {
|
exc = new Error(`/join : room '${roomName}' not found`);
|
||||||
const exc = new Error(`/join : you're not invited to join '${roomName}'`);
|
} else if ((err.statusCode ?? err.status) === 403) {
|
||||||
|
exc = new Error(`/join : you're not invited to join '${roomName}'`);
|
||||||
} else {
|
} else {
|
||||||
const exc = err;
|
exc = err;
|
||||||
}
|
}
|
||||||
this._sendError = exc;
|
this._sendError = exc;
|
||||||
this._timelineError = null;
|
this._timelineError = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user