openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
12 lines (11 loc) • 651 B
JavaScript
import { j as parseSessionThreadInfoFast } from "./store-load-C4uq6Lrq.js";
//#region src/auto-reply/reply/routed-delivery-thread.ts
/** Resolves the thread id used when replies are routed through channel delivery helpers. */
/** Prefers current inbound thread ids, falling back to persisted session thread metadata. */
function resolveRoutedDeliveryThreadId(params) {
if (params.ctx.MessageThreadId != null) return params.ctx.MessageThreadId;
if (params.ctx.TransportThreadId != null) return params.ctx.TransportThreadId;
return parseSessionThreadInfoFast(params.sessionKey).threadId;
}
//#endregion
export { resolveRoutedDeliveryThreadId as t };