Fix WhatsApp Admin QR bind and show the scan prompt only after Bind.

Use a current WA protocol version, start the sidecar via local tsx with inherited proxy, and stop auto-opening the QR UI on unbound connecting.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-08-17 23:54:48 +08:00
parent 5c6833612f
commit 9cf026f605
12 changed files with 593 additions and 101 deletions

View file

@ -46,4 +46,14 @@ if (Test-Path $sidecarPidFile) {
Remove-Item -Force $sidecarPidFile -ErrorAction SilentlyContinue
}
# cmd.exe wrapper can leave node/tsx children; sweep leftover runners for this channel.
$needle = "channel_sidecar\$ChannelId"
Get-CimInstance Win32_Process -ErrorAction SilentlyContinue | Where-Object {
$_.CommandLine -and
$_.CommandLine -like "*$needle*" -and
$_.CommandLine -like "*baileys_runner*"
} | ForEach-Object {
[void](Invoke-TaskKillQuiet -ProcessId ([string]$_.ProcessId) -ForceKill)
}
Write-Host "[ok] stopped whatsapp channel=$ChannelId"