Fix multi-invite error dialog messaging

Fixes https://github.com/vector-im/riot-web/issues/11515
pull/21833/head
Travis Ralston 2019-11-27 10:44:36 -07:00
parent fbba55ab05
commit d6821ecb99
1 changed files with 4 additions and 1 deletions

View File

@ -202,11 +202,14 @@ function _showAnyInviteErrors(addrs, room, inviter) {
}
}
// React 16 doesn't let us use `errorList.join(<br />)` anymore, so this is our solution
let description = <div>{errorList.map(e => <div key={e}>{e}</div>)}</div>;
if (errorList.length > 0) {
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
Modal.createTrackedDialog('Failed to invite the following users to the room', '', ErrorDialog, {
title: _t("Failed to invite the following users to the %(roomName)s room:", {roomName: room.name}),
description: errorList.join(<br />),
description,
});
}
}