fix(captain/hermes): nao enviar typing_off explicito

Antes: typing_on -> sleep delay -> create msg DB -> typing_off -> SendReplyJob
envia via wuzapi -> msg chega no celular (2-5s depois).

Resultado visual quebrado: cliente ve "digitando..." sumir antes da msg
chegar, gap visivel.

Agora: typing_on -> sleep -> create msg -> deixa rolar. WhatsApp do
cliente cancela typing automaticamente quando msg eh entregue. Sequencia
fica natural.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Rodribm10 2026-05-01 21:29:07 -03:00
parent 35358a42b1
commit c7300dfbcf

View File

@ -39,9 +39,10 @@ class Captain::Hermes::DelayedReplyJob < ApplicationJob
create_outgoing_message(conversation, content)
# WhatsApp cliente costuma sumir typing automático ao receber msg, mas
# mandamos typing_off explícito por segurança.
send_typing(conversation, 'typing_off') if delay.positive?
# NÃO mandamos typing_off explícito — WhatsApp cancela o indicador
# automaticamente quando a msg chega no celular. Mandar paused agora
# quebraria visualmente: typing some -> gap de 2-5s ate msg ser
# entregue via SendReplyJob -> msg chega. Deixa o WhatsApp gerenciar.
end
private