From 5ac0e6ba074caefb283e9203bcb0ecbbe4d5fb93 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 30 Jan 2019 15:45:42 +0100 Subject: [PATCH] replace join_room by view_room as deferred action, as join_room doens't change the page type in matrixchat --- src/components/structures/RoomView.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 265e4db4b4..01df8272fa 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -892,8 +892,8 @@ module.exports = React.createClass({ dis.dispatch({ action: 'do_after_sync_prepared', deferred_action: { - action: 'join_room', - opts: { inviteSignUrl: signUrl, viaServers: this.props.viaServers }, + action: 'view_room', + room_id: this.state.room.roomId, }, }); @@ -903,7 +903,6 @@ module.exports = React.createClass({ // XXX: ILAG is disabled for now, // see https://github.com/vector-im/riot-web/issues/8222 dis.dispatch({action: 'require_registration'}); - return; // dis.dispatch({ // action: 'will_join', // }); @@ -933,17 +932,18 @@ module.exports = React.createClass({ // }, // }).close; // 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) {