mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 19:14:52 +01:00
Fixed priority operations when checking request status
This commit is contained in:
parent
8b39346409
commit
be8962cec2
@ -214,9 +214,9 @@ export class RoomViewModel extends ViewModel {
|
||||
const internalId = await this._options.client.session.joinRoom(roomName);
|
||||
this.navigation.push("room", internalId);
|
||||
} catch (exc) {
|
||||
if (exc.statusCode ?? exc.status === 400) {
|
||||
if ((exc.statusCode ?? exc.status) === 400) {
|
||||
this._sendError = new Error(`/join : '${roomName}' was not legal room ID or room alias`);
|
||||
} else if ((exc.statusCode ?? exc.status === 404) || (exc.statusCode ?? exc.status === 502) || (exc.message == "Internal Server Error")) {
|
||||
} else if ((exc.statusCode ?? exc.status) === 404 || (exc.statusCode ?? exc.status) === 502 || exc.message == "Internal Server Error") {
|
||||
this._sendError = new Error(`/join : room '${roomName}' not found`);
|
||||
} else {
|
||||
this._sendError = new Error("join syntax: /join <room-id>");
|
||||
|
Loading…
Reference in New Issue
Block a user