Eliminate the use of MatrixClientPeg in utils (#10910)
This commit is contained in:
parent
a0c2676c38
commit
30429df948
108 changed files with 409 additions and 325 deletions
|
@ -115,7 +115,7 @@ export class IntegrationManagers {
|
|||
|
||||
private setupAccountManagers(): void {
|
||||
if (!this.client || !this.client.getUserId()) return; // not logged in
|
||||
const widgets = WidgetUtils.getIntegrationManagerWidgets();
|
||||
const widgets = WidgetUtils.getIntegrationManagerWidgets(this.client);
|
||||
widgets.forEach((w) => {
|
||||
const data = w.content["data"];
|
||||
if (!data) return;
|
||||
|
@ -180,14 +180,6 @@ export class IntegrationManagers {
|
|||
Modal.createDialog(IntegrationsDisabledDialog);
|
||||
}
|
||||
|
||||
public async overwriteManagerOnAccount(manager: IntegrationManagerInstance): Promise<void> {
|
||||
// TODO: TravisR - We should be logging out of scalar clients.
|
||||
await WidgetUtils.removeIntegrationManagerWidgets();
|
||||
|
||||
// TODO: TravisR - We should actually be carrying over the discovery response verbatim.
|
||||
await WidgetUtils.addIntegrationManagerWidget(manager.name, manager.uiUrl, manager.apiUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to discover an integration manager using only its name. This will not validate that
|
||||
* the integration manager is functional - that is the caller's responsibility.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue