diff --git a/src/ConferenceMatrixClient.ts b/src/ConferenceMatrixClient.ts index 7cb9376..86b406c 100644 --- a/src/ConferenceMatrixClient.ts +++ b/src/ConferenceMatrixClient.ts @@ -12,7 +12,9 @@ export class ConferenceMatrixClient extends MatrixClient { static async create(confConfig: IConfig, storage?: IStorageProvider) { let idClient: IdentityClient|undefined; if (confConfig.idServerDomain) { - idClient = await new MatrixClient(confConfig.homeserverUrl, confConfig.accessToken).getIdentityServerClient(confConfig.idServerDomain); + const client = new MatrixClient(confConfig.homeserverUrl, confConfig.accessToken); + client.impersonateUserId(confConfig.userId); + idClient = await client.getIdentityServerClient(confConfig.idServerDomain); await idClient.acceptAllTerms(); if (confConfig.idServerBrand) { idClient.brand = confConfig.idServerBrand;