Put room name in 'leave room' confirmation dialog

https://github.com/vector-im/riot-web/issues/3850
This commit is contained in:
David Baker 2017-05-08 16:49:40 +01:00
parent 9cae667c06
commit 85ed39b9d8

View file

@ -392,9 +392,10 @@ module.exports = React.createClass({
this.notifyNewScreen('forgot_password');
break;
case 'leave_room':
const roomToLeave = MatrixClientPeg.get().getRoom(payload.room_id);
Modal.createDialog(QuestionDialog, {
title: "Leave room",
description: "Are you sure you want to leave the room?",
description: <span>Are you sure you want to leave the room <i>{roomToLeave.name}</i>?</span>,
onFinished: (should_leave) => {
if (should_leave) {
const d = MatrixClientPeg.get().leave(payload.room_id);