Add IS auth to AddressPickerDialog

pull/21833/head
J. Ryan Stinnett 2019-07-25 11:06:46 +01:00
parent dd792e10a9
commit 432e70e2ce
1 changed files with 7 additions and 1 deletions

View File

@ -513,7 +513,13 @@ module.exports = React.createClass({
if (cancelled) return null;
try {
const lookup = await MatrixClientPeg.get().lookupThreePid(medium, address);
const hsAccountToken = await MatrixClientPeg.get().getOpenIdToken();
if (cancelled) return null;
const isAccountToken = await MatrixClientPeg.get().registerWithIdentityServer(hsAccountToken);
if (cancelled) return null;
const lookup = await MatrixClientPeg.get().lookupThreePid(medium, address, undefined, isAccountToken);
if (cancelled || lookup === null || !lookup.mxid) return null;
const profile = await MatrixClientPeg.get().getProfileInfo(lookup.mxid);