fix(channels): align command-body parsing sources

This commit is contained in:
Peter Steinberger
2026-03-01 23:11:20 +00:00
parent 4c43fccb3e
commit 8e48520d74
5 changed files with 16 additions and 6 deletions

View File

@@ -638,6 +638,7 @@ export async function monitorMattermostProvider(opts: MonitorMattermostOpts = {}
const to = kind === "direct" ? `user:${senderId}` : `channel:${channelId}`;
const mediaPayload = buildAgentMediaPayload(mediaList);
const commandBody = rawText.trim();
const inboundHistory =
historyKey && historyLimit > 0
? (channelHistories.get(historyKey) ?? []).map((entry) => ({
@@ -651,7 +652,8 @@ export async function monitorMattermostProvider(opts: MonitorMattermostOpts = {}
BodyForAgent: bodyText,
InboundHistory: inboundHistory,
RawBody: bodyText,
CommandBody: bodyText,
CommandBody: commandBody,
BodyForCommands: commandBody,
From:
kind === "direct"
? `mattermost:${senderId}`