You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-31 13:44:28 +03:00
Put room name in 'leave room' confirmation dialog
https://github.com/vector-im/riot-web/issues/3850
This commit is contained in:
@ -392,9 +392,10 @@ module.exports = React.createClass({
|
|||||||
this.notifyNewScreen('forgot_password');
|
this.notifyNewScreen('forgot_password');
|
||||||
break;
|
break;
|
||||||
case 'leave_room':
|
case 'leave_room':
|
||||||
|
const roomToLeave = MatrixClientPeg.get().getRoom(payload.room_id);
|
||||||
Modal.createDialog(QuestionDialog, {
|
Modal.createDialog(QuestionDialog, {
|
||||||
title: "Leave room",
|
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) => {
|
onFinished: (should_leave) => {
|
||||||
if (should_leave) {
|
if (should_leave) {
|
||||||
const d = MatrixClientPeg.get().leave(payload.room_id);
|
const d = MatrixClientPeg.get().leave(payload.room_id);
|
||||||
|
Reference in New Issue
Block a user