fix: iMessage room select logic

This commit is contained in:
Molt Crab 2026-01-28 20:17:53 +09:00
parent 9688454a30
commit 8a9250e092
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 resolvedSender = params.senderLabel?.trim() || resolveSenderLabel(params.sender ?? {});
const body = !isDirect && resolvedSender ? `${resolvedSender}: ${params.body}` : params.body;
const channelWithType = !isDirect ? `${params.channel} (${chatType})` : params.channel;
return formatAgentEnvelope({
channel: params.channel,
channel: channelWithType,
from: params.from,
timestamp: params.timestamp,
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({
Body: combinedBody,
RawBody: bodyText,