Read alternate WhatsApp sender in bridge replies

This commit is contained in:
Tiago
2026-09-29 16:17:56 -03:00
parent 9cf954c9f4
commit 61964ea05a
@@ -105,7 +105,7 @@ public final class ExternalBridgeHandler implements HttpHandler {
private void receberRespostaEvolution(HttpExchange ex) throws Exception {
validarWebhookEvolution(ex);
String raw = rawBody(ex);
String numero = telefoneWhatsapp(firstNonBlank(extract(raw, "remoteJid"), extract(raw, "from"), extract(raw, "number"), extract(raw, "sender")));
String numero = telefoneWhatsapp(firstNonBlank(extract(raw, "remoteJidAlt"), extract(raw, "remoteJid"), extract(raw, "from"), extract(raw, "number"), extract(raw, "sender")));
String texto = firstNonBlank(extract(raw, "conversation"), extract(raw, "text"), extract(raw, "body"), extract(raw, "message"));
if (numero.isBlank()) {
HttpResponses.json(ex, 400, Map.of("erro", "numero_nao_identificado"));