You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-16 06:42:26 +03:00
Add support for specifying the screen after require_registration
Also use it in start chat and join group Signed-off-by: Stuart Mumford <stuart@cadair.com>
This commit is contained in:
@@ -481,7 +481,8 @@ export default createReactClass({
|
||||
group_id: groupId,
|
||||
},
|
||||
});
|
||||
dis.dispatch({action: 'require_registration'});
|
||||
dis.dispatch({action: 'require_registration',
|
||||
screen_after: {screen: `group/${groupId}`}});
|
||||
willDoOnboarding = true;
|
||||
}
|
||||
if (stateKey === GroupStore.STATE_KEY.Summary) {
|
||||
@@ -726,7 +727,8 @@ export default createReactClass({
|
||||
|
||||
_onJoinClick: async function() {
|
||||
if (this._matrixClient.isGuest()) {
|
||||
dis.dispatch({action: 'require_registration'});
|
||||
dis.dispatch({action: 'require_registration',
|
||||
screen_after: {screen: `group/${this.props.groupId}`}});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1008,6 +1008,11 @@ export default createReactClass({
|
||||
// needs to be reset so that they can revisit /user/.. // (and trigger
|
||||
// `_chatCreateOrReuse` again)
|
||||
go_welcome_on_cancel: true,
|
||||
screen_after: {screen: `user/${this.props.config.welcomeUserId}`,
|
||||
params: {
|
||||
action: 'chat'
|
||||
}
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user