Messages are imported direct to chatwoot database. Media and group messages are ignored.
New env.yml variables:
CHATWOOT_IMPORT_DATABASE_CONNECTION_URI: URI to connect direct on chatwoot database.
CHATWOOT_IMPORT_PLACEHOLDER_MEDIA_MESSAGE: Indicates to use a text placeholder on media messages.
New instance setting:
sync_full_history: Indicates to request a full history sync to baileys.
New chatwoot options:
import_contacts: Indicates to import contacts.
import_messages: Indicates to import messages.
days_limit_import_messages: Number of days to limit history messages to import.
In some tests made on the testProxy function, the `new ProxyAgent()` was not working, even adding it the IP result was the same.
I've change it to the `new HttpsProxyAgent()` and it worked.
Refactored the proxy agent to center the same function/creation the same where it is used
When saving data from a group session (sender-key-xxxxx@g.us::xxxxx::xx) we receive the data param as an array.
In mongodb we can't save an array as a root document. Bacause this, in this case we save the array in a property called content_array.