UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

21 lines (20 loc) 664 B
import { n as normalizeAccountId } from "./account-id-Df9e41E6.js"; //#region extensions/matrix/src/matrix/active-client.ts const activeClients = /* @__PURE__ */ new Map(); function resolveAccountKey(accountId) { return normalizeAccountId(accountId) || "default"; } function setActiveMatrixClient(client, accountId) { const key = resolveAccountKey(accountId); if (!client) { activeClients.delete(key); return; } activeClients.set(key, client); } function getActiveMatrixClient(accountId) { const key = resolveAccountKey(accountId); return activeClients.get(key) ?? null; } //#endregion export { setActiveMatrixClient as n, getActiveMatrixClient as t };