mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +08:00
Send also domain and user localpart to HostingSignupDialog iframe
This commit is contained in:
parent
b3b3f5ebeb
commit
d607999cff
@ -47,10 +47,10 @@ export default class HostingSignupDialog extends React.PureComponent<IProps, ISt
|
||||
if (!this.hostingSignupUrl.startsWith(message.origin)) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (message.data.action) {
|
||||
case 'access_token_credential_request':
|
||||
this.sendAccessToken();
|
||||
case 'account_credentials_request':
|
||||
// noinspection JSIgnoredPromiseFromCall
|
||||
this.sendAccountDetails();
|
||||
break;
|
||||
case 'openid_credentials_request':
|
||||
// noinspection JSIgnoredPromiseFromCall
|
||||
@ -103,10 +103,14 @@ export default class HostingSignupDialog extends React.PureComponent<IProps, ISt
|
||||
}
|
||||
}
|
||||
|
||||
private sendAccessToken() {
|
||||
private async sendAccountDetails() {
|
||||
this.sendMessage({
|
||||
action: 'access_token_credential',
|
||||
token: MatrixClientPeg.get().getAccessToken(),
|
||||
action: 'account_credentials',
|
||||
credentials: {
|
||||
accessToken: await MatrixClientPeg.get().getAccessToken(),
|
||||
serverName: await MatrixClientPeg.get().getDomain(),
|
||||
userLocalpart: await MatrixClientPeg.get().getUserIdLocalpart(),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user