Commit 338cc93
authored
Fix Typebot message routing for @lid JIDs
O Typebot não respondia mensagens vindas de JIDs que terminam com "@lid", apenas "@s.whatsapp.net".
O comportamento ocorria porque o número era sempre extraído via:
remoteJid.split('@')[0]
Com a atualização do WhatsApp Web, algumas mensagens de mídia chegam com JID "@lid", e nesses casos o JID completo precisa ser mantido.
Ajuste realizado:
ANTES:
number: remoteJid.split('@')[0]
DEPOIS:
number: remoteJid.includes('@lid') ? remoteJid : remoteJid.split('@')[0]
Com essa condição, mensagens vindas de ambos os formatos passam a ser tratadas corretamente pelo Typebot.1 parent df20c5f commit 338cc93
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
| 214 | + | |
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
293 | | - | |
| 293 | + | |
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
| |||
0 commit comments