fix: route discord native subagent announce to channel target

This commit is contained in:
Peter Steinberger
2026-02-18 02:42:52 +00:00
parent c1928845ac
commit 4134875c31
3 changed files with 11 additions and 2 deletions

View File

@@ -790,6 +790,11 @@ async function dispatchDiscordCommandInteraction(params: {
Timestamp: Date.now(),
CommandAuthorized: commandAuthorized,
CommandSource: "native" as const,
// Native slash contexts use To=slash:<user> for interaction routing.
// For follow-up delivery (for example subagent completion announces),
// preserve the real Discord target separately.
OriginatingChannel: "discord" as const,
OriginatingTo: isDirectMessage ? `user:${user.id}` : `channel:${channelId}`,
});
const { onModelSelected, ...prefixOptions } = createReplyPrefixOptions({