fix(routing): only route to originating channel when cross-provider

When OriginatingChannel matches Surface (same provider), use normal
dispatcher. Only route via routeReply() when they differ, ensuring
cross-provider messages (e.g., Telegram queued while Slack active)
get routed back to their origin.
This commit is contained in:
Josh Lehman
2026-01-06 12:12:11 -08:00
committed by Peter Steinberger
parent 9d50ebad7d
commit 2d67ec5bfa
4 changed files with 79 additions and 7 deletions

View File

@@ -463,6 +463,7 @@ export async function monitorSignalProvider(
SenderName: envelope.sourceName ?? sender,
SenderId: sender,
Provider: "signal" as const,
Surface: "signal" as const,
MessageSid: envelope.timestamp ? String(envelope.timestamp) : undefined,
Timestamp: envelope.timestamp ?? undefined,
MediaPath: mediaPath,