diff --git a/plugin/index.ts b/plugin/index.ts index 2dd9411..0abe30c 100644 --- a/plugin/index.ts +++ b/plugin/index.ts @@ -581,6 +581,18 @@ export default { const hasConvMarker = prompt.includes("Conversation info (untrusted metadata):"); if (live.discordOnly !== false && (!hasConvMarker || derived.channel !== "discord")) return; + // Moderator bypass: if sender is the moderator bot, don't trigger no-reply + // This prevents moderator handoff messages from being treated as regular messages without 🔚 + const moderatorUserId = getModeratorUserId(live); + if (moderatorUserId && derived.senderId === moderatorUserId) { + if (shouldDebugLog(live, derived.channelId)) { + api.logger.info( + `whispergate: moderator bypass for senderId=${derived.senderId}, skipping no-reply`, + ); + } + return; + } + let rec = sessionDecision.get(key); if (!rec || Date.now() - rec.createdAt > DECISION_TTL_MS) { if (rec) sessionDecision.delete(key);