Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 3562031

Browse files
Luke Barnarddbkr
authored andcommitted
Fix regressions with starting a 1-1.
1 parent aef0a80 commit 3562031

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/components/views/dialogs/ChatInviteDialog.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import DMRoomMap from '../../../utils/DMRoomMap';
2424
import Modal from '../../../Modal';
2525
import AccessibleButton from '../elements/AccessibleButton';
2626
import q from 'q';
27+
import dis from '../../../dispatcher';
2728

2829
const TRUNCATE_QUERY_LIST = 40;
2930
const QUERY_USER_DIRECTORY_DEBOUNCE_MS = 200;
@@ -102,7 +103,7 @@ module.exports = React.createClass({
102103
const ChatCreateOrReuseDialog = sdk.getComponent(
103104
"views.dialogs.ChatCreateOrReuseDialog",
104105
);
105-
Modal.createDialog(ChatCreateOrReuseDialog, {
106+
const close = Modal.createDialog(ChatCreateOrReuseDialog, {
106107
userId: userId,
107108
onFinished: (success) => {
108109
this.props.onFinished(success);
@@ -112,14 +113,16 @@ module.exports = React.createClass({
112113
action: 'start_chat',
113114
user_id: userId,
114115
});
116+
close(true);
115117
},
116118
onExistingRoomSelected: (roomId) => {
117119
dis.dispatch({
118120
action: 'view_room',
119-
user_id: roomId,
121+
room_id: roomId,
120122
});
123+
close(true);
121124
},
122-
});
125+
}).close;
123126
} else {
124127
this._startChat(inviteList);
125128
}

0 commit comments

Comments
 (0)