Commit 4a85ece
fix: resolve @lid (LID) to phone number in messages handlers and fix QR code loop
- messages.upsert: mutate received.key.remoteJid to remoteJidAlt when @lid
is detected, ensuring prepareMessage, chatbot emit, contact upsert and
all downstream uses receive the correct @s.whatsapp.net JID instead of
the LID identifier
- messages.update: after finding the stored message by key.id, resolve
@lid using remoteJidAlt (fork field) or findMessage.key.remoteJid as
fallback; applies to DB status update, webhook to N8N, messageUpdate
record and chat unread counter
- connectionUpdate: guard against infinite QR code regeneration loop
when connection closes before QR is scanned (no wuid, no statusCode)
- Dockerfile: use tsup directly instead of npm run build to bypass
pre-existing tsc type error on terminateCall; add openssl/libc6-compat
to Alpine final stage for Prisma compatibility
- docker-compose.yaml: switch from remote image to local build so fixes
persist across container recreations
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 1665654 commit 4a85ece
File tree
3 files changed
+34
-13
lines changed- src/api/integrations/channel/whatsapp
3 files changed
+34
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| |||
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
42 | | - | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
| |||
Lines changed: 26 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
400 | 408 | | |
401 | 409 | | |
402 | 410 | | |
| |||
1130 | 1138 | | |
1131 | 1139 | | |
1132 | 1140 | | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
1133 | 1146 | | |
1134 | 1147 | | |
1135 | 1148 | | |
| |||
1408 | 1421 | | |
1409 | 1422 | | |
1410 | 1423 | | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
1411 | 1429 | | |
1412 | 1430 | | |
1413 | 1431 | | |
1414 | 1432 | | |
1415 | 1433 | | |
1416 | 1434 | | |
1417 | | - | |
| 1435 | + | |
1418 | 1436 | | |
1419 | | - | |
| 1437 | + | |
1420 | 1438 | | |
1421 | 1439 | | |
1422 | 1440 | | |
| |||
1436 | 1454 | | |
1437 | 1455 | | |
1438 | 1456 | | |
1439 | | - | |
1440 | | - | |
| 1457 | + | |
| 1458 | + | |
1441 | 1459 | | |
1442 | 1460 | | |
1443 | | - | |
1444 | | - | |
| 1461 | + | |
| 1462 | + | |
1445 | 1463 | | |
1446 | 1464 | | |
1447 | 1465 | | |
| |||
1454 | 1472 | | |
1455 | 1473 | | |
1456 | 1474 | | |
1457 | | - | |
| 1475 | + | |
1458 | 1476 | | |
1459 | | - | |
| 1477 | + | |
1460 | 1478 | | |
1461 | 1479 | | |
1462 | 1480 | | |
| |||
0 commit comments