Improve SSO login start screen and 3pid invite handling somewhat
This commit is contained in:
parent
295cf12cf8
commit
1d1a3e72ca
1 changed files with 8 additions and 0 deletions
|
@ -755,6 +755,8 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
||||||
break;
|
break;
|
||||||
case 'on_logged_in':
|
case 'on_logged_in':
|
||||||
if (
|
if (
|
||||||
|
// Skip this handling for token login as that always calls onLoggedIn itself
|
||||||
|
!this.tokenLogin &&
|
||||||
!Lifecycle.isSoftLogout() &&
|
!Lifecycle.isSoftLogout() &&
|
||||||
this.state.view !== Views.LOGIN &&
|
this.state.view !== Views.LOGIN &&
|
||||||
this.state.view !== Views.REGISTER &&
|
this.state.view !== Views.REGISTER &&
|
||||||
|
@ -1652,10 +1654,16 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
||||||
// TODO: Handle encoded room/event IDs: https://github.com/vector-im/element-web/issues/9149
|
// TODO: Handle encoded room/event IDs: https://github.com/vector-im/element-web/issues/9149
|
||||||
|
|
||||||
let threepidInvite: IThreepidInvite;
|
let threepidInvite: IThreepidInvite;
|
||||||
|
// if we landed here from a 3PID invite, persist it
|
||||||
if (params.signurl && params.email) {
|
if (params.signurl && params.email) {
|
||||||
threepidInvite = ThreepidInviteStore.instance
|
threepidInvite = ThreepidInviteStore.instance
|
||||||
.storeInvite(roomString, params as IThreepidInviteWireFormat);
|
.storeInvite(roomString, params as IThreepidInviteWireFormat);
|
||||||
}
|
}
|
||||||
|
// otherwise check that this room doesn't already have a known invite
|
||||||
|
if (!threepidInvite) {
|
||||||
|
const invites = ThreepidInviteStore.instance.getInvites();
|
||||||
|
threepidInvite = invites.find(invite => invite.roomId === roomString);
|
||||||
|
}
|
||||||
|
|
||||||
// on our URLs there might be a ?via=matrix.org or similar to help
|
// on our URLs there might be a ?via=matrix.org or similar to help
|
||||||
// joins to the room succeed. We'll pass these through as an array
|
// joins to the room succeed. We'll pass these through as an array
|
||||||
|
|
Loading…
Reference in a new issue