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

Function getDefaultNotifyTarget

src/runtime/tools/manage-schedule-tool.ts:107–128  ·  view source on GitHub ↗
(
  adapter: RuntimePlatform,
  channelId: string,
)

Source from the content-addressed store, hash-verified

105}
106
107function getDefaultNotifyTarget(
108 adapter: RuntimePlatform,
109 channelId: string,
110): { adapter: NotifyTargetPlatform; channelId: string } | null {
111 if (adapter === "telegram" && channelId.startsWith("telegram-")) {
112 return { adapter: "telegram", channelId };
113 }
114
115 if (adapter === "slack" && channelId.startsWith("slack-")) {
116 return { adapter: "slack", channelId };
117 }
118
119 if (adapter === "feishu" && channelId.startsWith("feishu-")) {
120 return { adapter: "feishu", channelId };
121 }
122
123 if (adapter === "web") {
124 return { adapter: "web", channelId };
125 }
126
127 return null;
128}
129
130// ---------------------------------------------------------------------------
131// Tool Definition

Callers 1

executeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected