Skip to content

Commit

Permalink
Impersonate! the identity client.
Browse files Browse the repository at this point in the history
  • Loading branch information
Half-Shot committed Feb 2, 2024
1 parent fa880ec commit 47912fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ConferenceMatrixClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 47912fc

Please sign in to comment.