This commit is contained in:
kimeojin 2026-01-29 21:53:27 -05:00 committed by GitHub
commit 3dfc90b97b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -196,8 +196,9 @@ export function formatInboundEnvelope(params: {
const isDirect = !chatType || chatType === "direct"; const isDirect = !chatType || chatType === "direct";
const resolvedSender = params.senderLabel?.trim() || resolveSenderLabel(params.sender ?? {}); const resolvedSender = params.senderLabel?.trim() || resolveSenderLabel(params.sender ?? {});
const body = !isDirect && resolvedSender ? `${resolvedSender}: ${params.body}` : params.body; const body = !isDirect && resolvedSender ? `${resolvedSender}: ${params.body}` : params.body;
const channelWithType = !isDirect ? `${params.channel} (${chatType})` : params.channel;
return formatAgentEnvelope({ return formatAgentEnvelope({
channel: params.channel, channel: channelWithType,
from: params.from, from: params.from,
timestamp: params.timestamp, timestamp: params.timestamp,
previousTimestamp: params.previousTimestamp, previousTimestamp: params.previousTimestamp,

View File

@ -466,7 +466,7 @@ export async function monitorIMessageProvider(opts: MonitorIMessageOpts = {}): P
}); });
} }
const imessageTo = (isGroup ? chatTarget : undefined) || `imessage:${sender}`; const imessageTo = chatId ? `chat_id:${chatId}` : `imessage:${sender}`;
const ctxPayload = finalizeInboundContext({ const ctxPayload = finalizeInboundContext({
Body: combinedBody, Body: combinedBody,
RawBody: bodyText, RawBody: bodyText,