Matrix: replace legacy plugin with new implementation

This commit is contained in:
Gustavo Madeira Santana
2026-03-08 21:45:57 -04:00
parent 455c4f3436
commit 8e962668ce
273 changed files with 7226 additions and 16101 deletions

View File

@@ -0,0 +1,28 @@
import { bootstrapMatrixVerification } from "../src/matrix/actions/verification.js";
import { installLiveHarnessRuntime, resolveLiveHarnessConfig } from "./live-common.js";
async function main() {
const recoveryKeyArg = process.argv[2];
const forceResetCrossSigning = process.argv.includes("--force-reset-cross-signing");
const base = resolveLiveHarnessConfig();
const pluginCfg = installLiveHarnessRuntime(base);
(pluginCfg.channels["matrix"] as { encryption: boolean }).encryption = true;
const result = await bootstrapMatrixVerification({
recoveryKey: recoveryKeyArg?.trim() || undefined,
forceResetCrossSigning,
});
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
if (!result.success) {
process.exitCode = 1;
}
}
main().catch((err) => {
process.stderr.write(
`E2EE_BOOTSTRAP_ERROR: ${err instanceof Error ? err.message : String(err)}\n`,
);
process.exit(1);
});