Merge pull request #873 from matrix-org/dbkr/room_name_in_leave_confirm

Put room name in 'leave room' confirmation dialog
pull/21833/head
David Baker 2017-05-08 17:02:53 +01:00 committed by GitHub
commit e5b1e4ce6d
1 changed files with 2 additions and 1 deletions

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);