Commit Graph

4 Commits

Author SHA1 Message Date
VPS 4 Deploy Agent a1eec8dac2 feat(ext-api): inbox ordenado, avatar self-heal, /sec/keys e guard de grupo
- GET /inbox: orderBy lastMessageAt DESC NULLS LAST (Postgres põe NULLS FIRST
  em DESC → chats-stub sem mensagem tomavam o topo; parecia lista de contatos).
- GET /contacts/:jid/avatar/refresh: re-busca a foto pela conexão Baileys viva
  (URLs do CDN expiram/404), com timeout de 5s e limpeza da URL obsoleta.
- GET/PUT /sec/keys: passam a ler/gravar na config do plugin 'secretaria'
  (config é por-plugin: set(pluginName, obj)); antes gravava em plugin errado
  e o brain nunca via as chaves. Corrige TS2345.
- auto-reply da Secretária: nunca responde em grupos (@g.us).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 20:55:22 +02:00
VPS 4 Deploy Agent 62ba985ebe fix(ext-api): /secretaria/ask usa chat.jid (não remoteJid inexistente)
prisma.chat.findFirst filtrava por remoteJid, que não existe no model Chat (é jid)
→ 500 em todo /secretaria/ask. Corrigido; endpoint retorna o reply normalmente.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 16:53:13 +02:00
VPS 4 Deploy Agent 734b250238 feat(ext-api): alias GET /secretaria/numbers (sincroniza contrato com satélite)
O satélite (mercado, webhook-receiver) chama /api/ext/v1/secretaria/numbers, mas
o ext-api só tinha /sec/*. Adiciona o alias que espelha a rota interna
/api/secretaria/numbers (lista sec_numbers) — retrocompatível, não altera o satélite.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 08:27:41 +02:00
VPS 4 Deploy Agent 2f8c04a0a7 chore(ops): restore all source files in newwhats.clube67.com
continuous-integration/webhook Falha no deploy de clube67_newwhats.local (VPS 4)
2026-05-18 03:28:29 +02:00