mirror of https://github.com/vector-im/riot-web
PR feedback
parent
ff5c7072d7
commit
c35c9f7c3a
|
@ -98,11 +98,9 @@ module.exports = React.createClass({
|
||||||
var QuestionDialog = sdk.getComponent("dialogs.QuestionDialog");
|
var QuestionDialog = sdk.getComponent("dialogs.QuestionDialog");
|
||||||
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||||
|
|
||||||
var room_alias = get_display_alias_for_room(room);
|
|
||||||
|
|
||||||
Modal.createDialog(QuestionDialog, {
|
Modal.createDialog(QuestionDialog, {
|
||||||
title: "Remove from Directory",
|
title: "Remove from Directory",
|
||||||
description: `Delete the room alias '${room_alias}' and remove '${name}' from the directory?`,
|
description: `Delete the room alias '${alias}' and remove '${name}' from the directory?`,
|
||||||
onFinished: (should_delete) => {
|
onFinished: (should_delete) => {
|
||||||
if (!should_delete) return;
|
if (!should_delete) return;
|
||||||
|
|
||||||
|
@ -112,12 +110,13 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
MatrixClientPeg.get().setRoomDirectoryVisibility(room.room_id, 'private').then(() => {
|
MatrixClientPeg.get().setRoomDirectoryVisibility(room.room_id, 'private').then(() => {
|
||||||
step = 'delete the alias.';
|
step = 'delete the alias.';
|
||||||
MatrixClientPeg.get().deleteAlias(room_alias);
|
return MatrixClientPeg.get().deleteAlias(alias);
|
||||||
}).done(() => {
|
}).done(() => {
|
||||||
modal.close();
|
modal.close();
|
||||||
this.getPublicRooms();
|
this.getPublicRooms();
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
modal.close();
|
modal.close();
|
||||||
|
this.getPublicRooms();
|
||||||
Modal.createDialog(ErrorDialog, {
|
Modal.createDialog(ErrorDialog, {
|
||||||
title: "Failed to "+step,
|
title: "Failed to "+step,
|
||||||
description: err.toString()
|
description: err.toString()
|
||||||
|
|
Loading…
Reference in New Issue