fix(whatsapp): sync sidecar on start and forward all group inbounds

Copy bridge files when starting WhatsApp sidecar, enforce group policy only in gateway with richer @ detection, and log skipped group messages for debugging.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-06-04 19:52:25 +08:00
parent 9657b313a3
commit dcb779a691
5 changed files with 73 additions and 48 deletions

View file

@ -35,6 +35,16 @@ if (-not (Test-Path (Join-Path $sidecarRoot "baileys_runner.ts"))) {
throw "whatsapp sidecar not installed. Run whatsapp_install.ps1 first."
}
$bridgeSrc = Join-Path $oclawRoot "runtime\\operations\\whatsapp_bridge"
if (Test-Path $bridgeSrc) {
foreach ($name in @("baileys_runner.ts", "auth.ts", "qr.ts")) {
$srcPath = Join-Path $bridgeSrc $name
if (Test-Path $srcPath) {
Copy-Item -Path $srcPath -Destination (Join-Path $sidecarRoot $name) -Force
}
}
}
$healthUrl = ($GatewayBaseUrl.TrimEnd("/") + "/health")
for ($i = 0; $i -lt $GatewayWaitSeconds; $i++) {
try {