mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-26 16:06:16 +00:00
refactor: dedupe channel entrypoints and test bridges
This commit is contained in:
@@ -1,17 +1,11 @@
|
||||
import type { OpenClawPluginApi } from "openclaw/plugin-sdk/matrix";
|
||||
import { emptyPluginConfigSchema } from "openclaw/plugin-sdk/matrix";
|
||||
import { defineChannelPluginEntry } from "openclaw/plugin-sdk/core";
|
||||
import { matrixPlugin } from "./src/channel.js";
|
||||
import { setMatrixRuntime } from "./src/runtime.js";
|
||||
|
||||
const plugin = {
|
||||
export default defineChannelPluginEntry({
|
||||
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;
|
||||
description: "Matrix channel plugin",
|
||||
plugin: matrixPlugin,
|
||||
setRuntime: setMatrixRuntime,
|
||||
});
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { defineSetupPluginEntry } from "openclaw/plugin-sdk/core";
|
||||
import { matrixPlugin } from "./src/channel.js";
|
||||
|
||||
export default {
|
||||
plugin: matrixPlugin,
|
||||
};
|
||||
export default defineSetupPluginEntry(matrixPlugin);
|
||||
|
||||
Reference in New Issue
Block a user