MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / parseDeliveryTarget

Function parseDeliveryTarget

src/schedule/delivery.ts:26–31  ·  view source on GitHub ↗
(s: string | undefined | null)

Source from the content-addressed store, hash-verified

24
25/** Parse a `telegram:<id>` / `discord:<id>` / `slack:<id>` target. Returns null when malformed. PURE. */
26export function parseDeliveryTarget(s: string | undefined | null): DeliveryTarget | null {
27 if (!s) return null;
28 const m = /^\s*(telegram|discord|slack)\s*:\s*(\S.*?)\s*$/i.exec(s);
29 if (!m) return null;
30 return { platform: m[1]!.toLowerCase() as DeliveryTarget['platform'], chatId: m[2]! };
31}
32
33/** Build the chat summary for a finished run. PURE. Pulls out a recipe's final status line
34 * (e.g. `VERIFIED-PR: opened …`) and leads with it, since that's the headline a user wants. */

Callers 5

bot-slack.test.tsFile · 0.90
index.tsFile · 0.85
dispatchActionFunction · 0.85
runOneFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected