fix: imessage dm replies and error details (#935)

This commit is contained in:
Peter Steinberger
2026-01-15 07:58:44 +00:00
parent 9c04a79c0a
commit a5a9788b20
7 changed files with 88 additions and 6 deletions

View File

@@ -26,7 +26,12 @@ export function buildThreadingToolContext(params: {
const dock = getChannelDock(provider);
if (!dock?.threading?.buildToolContext) return {};
// WhatsApp context isolation keys off conversation id, not the bot's own number.
const threadingTo = provider === "whatsapp" ? (sessionCtx.From ?? sessionCtx.To) : sessionCtx.To;
const threadingTo =
provider === "whatsapp"
? (sessionCtx.From ?? sessionCtx.To)
: provider === "imessage" && sessionCtx.ChatType === "direct"
? (sessionCtx.From ?? sessionCtx.To)
: sessionCtx.To;
return (
dock.threading.buildToolContext({
cfg: config,