File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
src/components/structures Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -98,11 +98,9 @@ module.exports = React.createClass({
98
98
var QuestionDialog = sdk . getComponent ( "dialogs.QuestionDialog" ) ;
99
99
var ErrorDialog = sdk . getComponent ( "dialogs.ErrorDialog" ) ;
100
100
101
- var room_alias = get_display_alias_for_room ( room ) ;
102
-
103
101
Modal . createDialog ( QuestionDialog , {
104
102
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?` ,
106
104
onFinished : ( should_delete ) => {
107
105
if ( ! should_delete ) return ;
108
106
@@ -112,12 +110,13 @@ module.exports = React.createClass({
112
110
113
111
MatrixClientPeg . get ( ) . setRoomDirectoryVisibility ( room . room_id , 'private' ) . then ( ( ) => {
114
112
step = 'delete the alias.' ;
115
- MatrixClientPeg . get ( ) . deleteAlias ( room_alias ) ;
113
+ return MatrixClientPeg . get ( ) . deleteAlias ( alias ) ;
116
114
} ) . done ( ( ) => {
117
115
modal . close ( ) ;
118
116
this . getPublicRooms ( ) ;
119
117
} , function ( err ) {
120
118
modal . close ( ) ;
119
+ this . getPublicRooms ( ) ;
121
120
Modal . createDialog ( ErrorDialog , {
122
121
title : "Failed to " + step ,
123
122
description : err . toString ( )
You can’t perform that action at this time.
0 commit comments