openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
20 lines (19 loc) • 807 B
JavaScript
import { u as resolveMatrixRoomId } from "./send-DOJVJulA.js";
import { r as withResolvedRuntimeMatrixClient } from "./client-bootstrap-BUEtsie0.js";
//#region extensions/matrix/src/matrix/actions/client.ts
async function withResolvedActionClient(opts, run, mode = "stop") {
return await withResolvedRuntimeMatrixClient(opts, run, mode);
}
async function withStartedActionClient(opts, run) {
return await withResolvedActionClient({
...opts,
readiness: "started"
}, run, "persist");
}
async function withResolvedRoomAction(roomId, opts, run) {
return await withResolvedActionClient(opts, async (client) => {
return await run(client, await resolveMatrixRoomId(client, roomId));
});
}
//#endregion
export { withResolvedRoomAction as n, withStartedActionClient as r, withResolvedActionClient as t };