evolution-api icon indicating copy to clipboard operation
evolution-api copied to clipboard

DATABASE_SAVE_DATA_CONTACTS=false ainda assim salva os contatos na base de dados

Open julioantunes-ti opened this issue 10 months ago • 2 comments

Welcome!

  • [x] Yes, I have searched for similar issues on GitHub and found none.

What did you do?

Mesmo estando com DATABASE_SAVE_DATA_CONTACTS=false os contatos são inseridos na base de dados.

Estou utilizando docker.

A DATABASE_SAVE_DATA_CHATS=false que é para salvar os chats, esta está funcionando.

What did you expect?

Que não salvasse os contatos.

What did you observe instead of what you expected?

Indiferente de true ou false, sempre salva os contatos.

Screenshots/Videos

Image

Which version of the API are you using?

2.2.3

What is your environment?

Linux

Other environment specifications

Utilizando em docker numa instancia EC2 t3 Micro (1 CPU e 1 GB RAM)

Banco de dados PostgreSQL.

8 instância conectada. Todas tem o mesmo comportamento. Salvam os contatos.

If applicable, paste the log output

No response

Additional Notes

No response

julioantunes-ti avatar Mar 19 '25 12:03 julioantunes-ti

Apparently, this happens because when a new message is received (perhaps there are other events that also trigger this behavior), Baileys sends a contacts.update event which triggers the BaileysStartupService.contactHandle and such handler is not checking if (this.configService.get<Database>('DATABASE').SAVE_DATA.CONTACTS) before calling the this.prismaRepository.contact.upsert

Image

igorMSoares avatar Apr 01 '25 21:04 igorMSoares

Existe alguma correção que eu possa fazer aqui do meu lado para parar estes update e salvar contato?

julioantunes-ti avatar May 28 '25 13:05 julioantunes-ti