MCPcopy Create free account
hub / github.com/CreminiAI/skillpack / notifyFn

Function notifyFn

src/runtime/server.ts:262–271  ·  view source on GitHub ↗
(adapterName: string, channelId: string, text: string)

Source from the content-addressed store, hash-verified

260 // Build the unified notify function for scheduler → IM push
261 const { isMessageSender } = await import("./adapters/types.js");
262 const notifyFn = async (adapterName: string, channelId: string, text: string) => {
263 const adapter = adapterMap.get(adapterName);
264 if (!adapter || !isMessageSender(adapter)) {
265 console.warn(
266 `[Scheduler] Target adapter "${adapterName}" not found or doesn't support sendMessage`,
267 );
268 return;
269 }
270 await adapter.sendMessage(channelId, text);
271 };
272
273 // Scheduler adapter (starts AFTER all IM adapters and loads job.json)
274 let schedulerAdapter: import("./adapters/scheduler.js").SchedulerAdapter | null = null;

Callers

nothing calls this directly

Calls 2

isMessageSenderFunction · 0.85
sendMessageMethod · 0.65

Tested by

no test coverage detected