mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
Added the 403 status when joining an unknown room
This commit is contained in:
parent
be8962cec2
commit
e345d0b33e
@ -216,7 +216,7 @@ export class RoomViewModel extends ViewModel {
|
|||||||
} catch (exc) {
|
} 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`);
|
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) === 403 || (exc.statusCode ?? exc.status) === 404 || (exc.statusCode ?? exc.status) === 502 || exc.message == "Internal Server Error") {
|
||||||
this._sendError = new Error(`/join : room '${roomName}' not found`);
|
this._sendError = new Error(`/join : room '${roomName}' not found`);
|
||||||
} else {
|
} else {
|
||||||
this._sendError = new Error("join syntax: /join <room-id>");
|
this._sendError = new Error("join syntax: /join <room-id>");
|
||||||
|
Loading…
Reference in New Issue
Block a user