OpenClaw Matrix Multi-Account Support Patch
Find a file
Claudia c0e38bb990 fix: serialize dynamic imports to prevent race condition on parallel account startup
Problem: When multiple Matrix accounts start in parallel, they all trigger
dynamic imports simultaneously. The Rust native crypto module
(@matrix-org/matrix-sdk-crypto-nodejs) crashes when loaded in parallel.

Solution: Add import-mutex.ts that caches import promises. Concurrent callers
now await the same promise instead of triggering parallel imports.

Files changed:
- NEW: src/matrix/import-mutex.ts - serializedImport() utility
- src/matrix/client/create-client.ts - use importCryptoNodejs()
- src/matrix/client/config.ts - use importCredentials()
2026-02-01 11:31:44 +01:00
src fix: serialize dynamic imports to prevent race condition on parallel account startup 2026-02-01 11:31:44 +01:00
.gitignore feat: Add multi-account Matrix support 2026-02-01 11:06:37 +01:00
CHANGELOG.md feat: Add multi-account Matrix support 2026-02-01 11:06:37 +01:00
index.ts feat: Add multi-account Matrix support 2026-02-01 11:06:37 +01:00
openclaw.plugin.json feat: Add multi-account Matrix support 2026-02-01 11:06:37 +01:00
package-lock.json feat: Add multi-account Matrix support 2026-02-01 11:06:37 +01:00
package.json feat: Add multi-account Matrix support 2026-02-01 11:06:37 +01:00
tsconfig.check.json feat: Add multi-account Matrix support 2026-02-01 11:06:37 +01:00