Handle M_UNSUPPORTED_ROOM_VERSION in invites and room creation
Fixes https://github.com/vector-im/riot-web/issues/8925
This commit is contained in:
parent
687b43f7b4
commit
d755263e33
3 changed files with 15 additions and 3 deletions
|
@ -122,9 +122,16 @@ function createRoom(opts) {
|
|||
action: 'join_room_error',
|
||||
});
|
||||
console.error("Failed to create room " + roomId + " " + err);
|
||||
let description = _t("Server may be unavailable, overloaded, or you hit a bug.");
|
||||
if (err.errcode === "M_UNSUPPORTED_ROOM_VERSION") {
|
||||
// Technically not possible with the UI as of April 2019 because there's no
|
||||
// options for the user to change this. However, it's not a bad thing to report
|
||||
// the error to the user for if/when the UI is available.
|
||||
description = _t("The server does not support the room version specified.");
|
||||
}
|
||||
Modal.createTrackedDialog('Failure to create room', '', ErrorDialog, {
|
||||
title: _t("Failure to create room"),
|
||||
description: _t("Server may be unavailable, overloaded, or you hit a bug."),
|
||||
description,
|
||||
});
|
||||
return null;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue