Merge eaf1990112 into 4583f88626
This commit is contained in:
commit
3dfc90b97b
@ -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,
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user