- Modified shared.ts to maintain a Map of clients per accountId - Each account gets its own Matrix client instance - Backwards compatible with single-account usage - resolveMatrixAuth now accepts accountId parameter - stopSharedClient can stop specific or all accounts Files changed: - src/matrix/client/shared.ts (main changes) - src/matrix/client/config.ts (accountId support) - src/matrix/accounts.ts (list enabled accounts) - src/matrix/monitor/index.ts (pass accountId) - src/types.ts (accounts config type)
18 lines
534 B
TypeScript
18 lines
534 B
TypeScript
import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
|
|
import { emptyPluginConfigSchema } from "openclaw/plugin-sdk";
|
|
|
|
import { matrixPlugin } from "./src/channel.js";
|
|
import { setMatrixRuntime } from "./src/runtime.js";
|
|
|
|
const plugin = {
|
|
id: "matrix",
|
|
name: "Matrix",
|
|
description: "Matrix channel plugin (matrix-js-sdk)",
|
|
configSchema: emptyPluginConfigSchema(),
|
|
register(api: OpenClawPluginApi) {
|
|
setMatrixRuntime(api.runtime);
|
|
api.registerChannel({ plugin: matrixPlugin });
|
|
},
|
|
};
|
|
|
|
export default plugin;
|