Skip to content

Commit c35c9f7

Browse files
committed
PR feedback
1 parent ff5c707 commit c35c9f7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/components/structures/RoomDirectory.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,9 @@ module.exports = React.createClass({
9898
var QuestionDialog = sdk.getComponent("dialogs.QuestionDialog");
9999
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
100100

101-
var room_alias = get_display_alias_for_room(room);
102-
103101
Modal.createDialog(QuestionDialog, {
104102
title: "Remove from Directory",
105-
description: `Delete the room alias '${room_alias}' and remove '${name}' from the directory?`,
103+
description: `Delete the room alias '${alias}' and remove '${name}' from the directory?`,
106104
onFinished: (should_delete) => {
107105
if (!should_delete) return;
108106

@@ -112,12 +110,13 @@ module.exports = React.createClass({
112110

113111
MatrixClientPeg.get().setRoomDirectoryVisibility(room.room_id, 'private').then(() => {
114112
step = 'delete the alias.';
115-
MatrixClientPeg.get().deleteAlias(room_alias);
113+
return MatrixClientPeg.get().deleteAlias(alias);
116114
}).done(() => {
117115
modal.close();
118116
this.getPublicRooms();
119117
}, function(err) {
120118
modal.close();
119+
this.getPublicRooms();
121120
Modal.createDialog(ErrorDialog, {
122121
title: "Failed to "+step,
123122
description: err.toString()

0 commit comments

Comments
 (0)