Merge branch 'develop' into travis/remove-skinning

This commit is contained in:
Travis Ralston 2022-03-31 19:25:43 -06:00
commit 97efdf7094
54 changed files with 1559 additions and 431 deletions

View file

@ -428,14 +428,14 @@ export class RoomViewStore extends Store<ActionPayload> {
}
public showJoinRoomError(err: MatrixError, roomId: string) {
let msg: ReactNode = err.message ? err.message : JSON.stringify(err);
logger.log("Failed to join room:", msg);
let description: ReactNode = err.message ? err.message : JSON.stringify(err);
logger.log("Failed to join room:", description);
if (err.name === "ConnectionError") {
msg = _t("There was an error joining the room");
description = _t("There was an error joining.");
} else if (err.errcode === 'M_INCOMPATIBLE_ROOM_VERSION') {
msg = <div>
{ _t("Sorry, your homeserver is too old to participate in this room.") }<br />
description = <div>
{ _t("Sorry, your homeserver is too old to participate here.") }<br />
{ _t("Please contact your homeserver administrator.") }
</div>;
} else if (err.httpStatus === 404) {
@ -444,16 +444,16 @@ export class RoomViewStore extends Store<ActionPayload> {
if (invitingUserId) {
// if the inviting user is on the same HS, there can only be one cause: they left.
if (invitingUserId.endsWith(`:${this.matrixClient.getDomain()}`)) {
msg = _t("The person who invited you already left the room.");
description = _t("The person who invited you has already left.");
} else {
msg = _t("The person who invited you already left the room, or their server is offline.");
description = _t("The person who invited you has already left, or their server is offline.");
}
}
}
Modal.createTrackedDialog('Failed to join room', '', ErrorDialog, {
title: _t("Failed to join room"),
description: msg,
title: _t("Failed to join"),
description,
});
}