refactor: lazy-load matrix setup bootstrap surfaces

This commit is contained in:
Peter Steinberger
2026-03-28 12:45:41 +00:00
parent 5df53a99b1
commit 3bb199aa43
8 changed files with 275 additions and 25 deletions

View File

@@ -24,7 +24,6 @@ import {
import { applyMatrixProfileUpdate, type MatrixProfileUpdateResult } from "./profile-update.js";
import { formatZonedTimestamp, normalizeAccountId, type ChannelSetupInput } from "./runtime-api.js";
import { getMatrixRuntime } from "./runtime.js";
import { maybeBootstrapNewEncryptedMatrixAccount } from "./setup-bootstrap.js";
import { matrixSetupAdapter } from "./setup-core.js";
import type { CoreConfig } from "./types.js";
@@ -215,6 +214,7 @@ async function addMatrixAccount(params: {
backupVersion: null,
};
if (accountConfig.encryption === true) {
const { maybeBootstrapNewEncryptedMatrixAccount } = await import("./setup-bootstrap.js");
verificationBootstrap = await maybeBootstrapNewEncryptedMatrixAccount({
previousCfg: cfg,
cfg: updated,