mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-13 10:11:20 +00:00
22 lines
707 B
TypeScript
22 lines
707 B
TypeScript
import type { ChannelPlugin } from "openclaw/plugin-sdk/channel-core";
|
|
import { createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
|
|
import type { ResolvedMatrixAccount } from "./matrix/accounts.js";
|
|
|
|
const loadMatrixChannelRuntime = createLazyRuntimeNamedExport(
|
|
() => import("./channel.runtime.js"),
|
|
"matrixChannelRuntime",
|
|
);
|
|
|
|
type MatrixResolver = NonNullable<ChannelPlugin<ResolvedMatrixAccount>["resolver"]>;
|
|
|
|
export const matrixResolverAdapter: MatrixResolver = {
|
|
resolveTargets: async ({ cfg, accountId, inputs, kind, runtime }) =>
|
|
(await loadMatrixChannelRuntime()).resolveMatrixTargets({
|
|
cfg,
|
|
accountId,
|
|
inputs,
|
|
kind,
|
|
runtime,
|
|
}),
|
|
};
|