Only autojoin using the search box enter/join btn
This commit is contained in:
parent
9e7a70b9d5
commit
7391796eab
1 changed files with 6 additions and 6 deletions
|
@ -333,7 +333,7 @@ module.exports = React.createClass({
|
||||||
if (alias.indexOf(':') == -1) {
|
if (alias.indexOf(':') == -1) {
|
||||||
alias = alias + ':' + this.state.roomServer;
|
alias = alias + ':' + this.state.roomServer;
|
||||||
}
|
}
|
||||||
this.showRoomAlias(alias);
|
this.showRoomAlias(alias, true);
|
||||||
} else {
|
} else {
|
||||||
// This is a 3rd party protocol. Let's see if we can join it
|
// This is a 3rd party protocol. Let's see if we can join it
|
||||||
const protocolName = protocolNameForInstanceId(this.protocols, this.state.instanceId);
|
const protocolName = protocolNameForInstanceId(this.protocols, this.state.instanceId);
|
||||||
|
@ -349,7 +349,7 @@ module.exports = React.createClass({
|
||||||
}
|
}
|
||||||
MatrixClientPeg.get().getThirdpartyLocation(protocolName, fields).done((resp) => {
|
MatrixClientPeg.get().getThirdpartyLocation(protocolName, fields).done((resp) => {
|
||||||
if (resp.length > 0 && resp[0].alias) {
|
if (resp.length > 0 && resp[0].alias) {
|
||||||
this.showRoomAlias(resp[0].alias);
|
this.showRoomAlias(resp[0].alias, true);
|
||||||
} else {
|
} else {
|
||||||
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||||
Modal.createTrackedDialog('Room not found', '', ErrorDialog, {
|
Modal.createTrackedDialog('Room not found', '', ErrorDialog, {
|
||||||
|
@ -367,15 +367,15 @@ module.exports = React.createClass({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
showRoomAlias: function(alias) {
|
showRoomAlias: function(alias, autoJoin=false) {
|
||||||
this.showRoom(null, alias);
|
this.showRoom(null, alias, autoJoin);
|
||||||
},
|
},
|
||||||
|
|
||||||
showRoom: function(room, room_alias) {
|
showRoom: function(room, room_alias, autoJoin=false) {
|
||||||
this.props.onFinished();
|
this.props.onFinished();
|
||||||
const payload = {
|
const payload = {
|
||||||
action: 'view_room',
|
action: 'view_room',
|
||||||
auto_join: true,
|
auto_join: autoJoin,
|
||||||
};
|
};
|
||||||
if (room) {
|
if (room) {
|
||||||
// Don't let the user view a room they won't be able to either
|
// Don't let the user view a room they won't be able to either
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue