Send also domain and user localpart to HostingSignupDialog iframe
This commit is contained in:
parent
b3b3f5ebeb
commit
d607999cff
1 changed files with 10 additions and 6 deletions
|
@ -47,10 +47,10 @@ export default class HostingSignupDialog extends React.PureComponent<IProps, ISt
|
||||||
if (!this.hostingSignupUrl.startsWith(message.origin)) {
|
if (!this.hostingSignupUrl.startsWith(message.origin)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (message.data.action) {
|
switch (message.data.action) {
|
||||||
case 'access_token_credential_request':
|
case 'account_credentials_request':
|
||||||
this.sendAccessToken();
|
// noinspection JSIgnoredPromiseFromCall
|
||||||
|
this.sendAccountDetails();
|
||||||
break;
|
break;
|
||||||
case 'openid_credentials_request':
|
case 'openid_credentials_request':
|
||||||
// noinspection JSIgnoredPromiseFromCall
|
// noinspection JSIgnoredPromiseFromCall
|
||||||
|
@ -103,10 +103,14 @@ export default class HostingSignupDialog extends React.PureComponent<IProps, ISt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private sendAccessToken() {
|
private async sendAccountDetails() {
|
||||||
this.sendMessage({
|
this.sendMessage({
|
||||||
action: 'access_token_credential',
|
action: 'account_credentials',
|
||||||
token: MatrixClientPeg.get().getAccessToken(),
|
credentials: {
|
||||||
|
accessToken: await MatrixClientPeg.get().getAccessToken(),
|
||||||
|
serverName: await MatrixClientPeg.get().getDomain(),
|
||||||
|
userLocalpart: await MatrixClientPeg.get().getUserIdLocalpart(),
|
||||||
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue