replace join_room by view_room as deferred action, as join_room doens't change the page type in matrixchat

This commit is contained in:
Bruno Windels 2019-01-30 15:45:42 +01:00
parent a0d44003e4
commit 5ac0e6ba07

View file

@ -892,8 +892,8 @@ module.exports = React.createClass({
dis.dispatch({ dis.dispatch({
action: 'do_after_sync_prepared', action: 'do_after_sync_prepared',
deferred_action: { deferred_action: {
action: 'join_room', action: 'view_room',
opts: { inviteSignUrl: signUrl, viaServers: this.props.viaServers }, room_id: this.state.room.roomId,
}, },
}); });
@ -903,7 +903,6 @@ module.exports = React.createClass({
// XXX: ILAG is disabled for now, // XXX: ILAG is disabled for now,
// see https://github.com/vector-im/riot-web/issues/8222 // see https://github.com/vector-im/riot-web/issues/8222
dis.dispatch({action: 'require_registration'}); dis.dispatch({action: 'require_registration'});
return;
// dis.dispatch({ // dis.dispatch({
// action: 'will_join', // action: 'will_join',
// }); // });
@ -933,17 +932,18 @@ module.exports = React.createClass({
// }, // },
// }).close; // }).close;
// return; // return;
} else {
Promise.resolve().then(() => {
const signUrl = this.props.thirdPartyInvite ?
this.props.thirdPartyInvite.inviteSignUrl : undefined;
dis.dispatch({
action: 'join_room',
opts: { inviteSignUrl: signUrl, viaServers: this.props.viaServers },
});
return Promise.resolve();
});
} }
Promise.resolve().then(() => {
const signUrl = this.props.thirdPartyInvite ?
this.props.thirdPartyInvite.inviteSignUrl : undefined;
dis.dispatch({
action: 'join_room',
opts: { inviteSignUrl: signUrl, viaServers: this.props.viaServers },
});
return Promise.resolve();
});
}, },
onMessageListScroll: function(ev) { onMessageListScroll: function(ev) {