@gonzih/cc-discord 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/notifier.js +5 -3
- package/package.json +1 -1
package/dist/notifier.js
CHANGED
|
@@ -203,9 +203,11 @@ export function startNotifier(bot, notifyChannelId, namespace, redis, handleUser
|
|
|
203
203
|
const content = parsed.content;
|
|
204
204
|
if (!content)
|
|
205
205
|
return;
|
|
206
|
-
//
|
|
207
|
-
//
|
|
208
|
-
|
|
206
|
+
// For the primary namespace: deliver to the primary Discord channel (DISCORD_NOTIFY_CHANNEL_ID
|
|
207
|
+
// or the last-active channel). Responses go to BOTH Telegram (via cc-tg) AND Discord.
|
|
208
|
+
// For other (routed) namespaces: only deliver to explicitly registered channelIds.
|
|
209
|
+
const targetChannelId = routedChannelIds.get(ns) ??
|
|
210
|
+
(ns === namespace ? (notifyChannelId ?? getActiveChannelId?.()) : undefined);
|
|
209
211
|
if (targetChannelId == null) {
|
|
210
212
|
log("warn", `meta-agent output: no channelId for namespace=${ns}, dropping line`);
|
|
211
213
|
return;
|