Commit Graph

533 Commits

Author SHA1 Message Date
Davidson Gomes
449a3b2252 Merge branch 'v2.0.0' of github.com:EvolutionAPI/evolution-api into v2.0.0 2024-10-03 08:33:31 -03:00
Davidson Gomes
efbb32ff0c fix: fetch status message 2024-10-03 08:32:45 -03:00
Davidson Gomes
168c5f18d8
Merge pull request #926 from lopesfontana/v2.0.0-contacts_pushName
V2.0.0 contacts push name
2024-09-28 07:32:20 -03:00
Andre Fontana
510eaf1141 Adjust contact pushName. Not save when in message.upsert and the pushName is from the instance name 2024-09-27 15:03:17 -03:00
Andre Fontana
1e5d62c777 Adjust contact pushName. Not save when in message.upsert and the pushName is from the instance name 2024-09-27 15:01:35 -03:00
Andre Fontana
ca2387cc70 Adjust contact pushName. Not save when in message.upsert and the pushName is from the instance name 2024-09-27 14:49:58 -03:00
Davidson Gomes
0ff421121f
Merge pull request #918 from judsonjuniorr/fix/validate-message-before-sending-chatwoot
Fix/validate message before sending chatwoot
2024-09-27 14:02:58 -03:00
Davidson Gomes
8789f9bc97
Merge pull request #917 from judsonjuniorr/feat/sync-lost-messages-chatwoot
feat: Sync lost messages on chatwoot
2024-09-27 14:01:41 -03:00
Judson Cairo
f35f8dd7e0 feat: Update the cw message with the wpp time 2024-09-27 13:56:52 -03:00
Judson Cairo
f9726863ef feat: Update chatwoot source ID and status after sent 2024-09-27 09:40:18 -03:00
Judson Cairo
49ceb44102 fix: Validate if chatwoot connection is available 2024-09-25 13:07:20 -03:00
Judson Cairo
f54a00a07f fix: Validate if source id already exists in chatwoot
Check if message is already saved before sending it
2024-09-25 11:56:51 -03:00
Judson Cairo
e241cf4ee0 feat: Sync lost messages on chatwoot
Runs the sync method every 30min
2024-09-25 11:48:19 -03:00
Felipe Medeiros
59fac8bc4a
Merge branch 'EvolutionAPI:v2.0.0' into v2.0.0 2024-09-23 20:54:31 -03:00
Felipe Medeiros
68b5d8db4d feat: adiciona o status da mensagem no retorno da função "prepareMessage" 2024-09-22 17:48:16 -03:00
Davidson Gomes
ffac87835b fix: settings on dify, flowise and openai 2024-09-22 10:10:36 -03:00
Davidson Gomes
5ebebbf211 fix: chatbot integrations send media and links 2024-09-22 08:53:10 -03:00
OlaRonyMax
ae69eb0bce
Visualização única no ChatWoot
Permite receber imagens e vídeos de visualização unica direto no  ChatWoot
2024-09-21 16:26:35 -03:00
Davidson Gomes
cecbf59f46 clear console logs 2024-09-21 13:42:23 -03:00
Davidson Gomes
d3f90a7abd fix: chatwoot integration 2024-09-21 13:41:51 -03:00
Davidson Gomes
4e4caab970 fix: chatwoot integration 2024-09-21 12:34:40 -03:00
Felipe Medeiros
79170b8f01 refactor: padroniza as mensagens salvas no banco 2024-09-20 18:41:01 -03:00
Felipe Medeiros
92373812c1 refactor: simplifica função sendMessage no Baileys
- Remove lógica duplicada de salvar mensagens no banco de dados e upload de mídia para o S3
- Padroniza o retorno da função, utilizando "messageRaw"
- Simplifica a validação da instância
- Elimina a verificação de configuração do S3 para envio de mídias
2024-09-20 17:37:37 -03:00
Felipe Medeiros
0544d80cbd refactor: padroniza retorno da função sendMessage no Baileys
Ajusta o retorno da função "sendMessage" para usar a variável "messageRaw" em vez de "messageSent", garantindo consistência no retorno.
2024-09-20 17:32:39 -03:00
Davidson Gomes
76fe717076
Merge pull request #894 from judsonjuniorr/fix/typebot-settings-for-ignore-jid
Fix ignoreJids on typebot
2024-09-19 12:54:33 -03:00
Judson Cairo
aeb422b3f7 Fix ignoreJids on typebot 2024-09-18 21:47:37 -03:00
Judson Cairo
6b447c654f Fix instance validation condition 2024-09-16 10:36:27 -03:00
Judson Cairo
ff98d0724e Validate if instance exists before deleting it 2024-09-12 18:43:29 -03:00
Davidson Gomes
9a1d5664c9
Merge pull request #883 from vidz1979/debounce-message-break
Debounce message break
2024-09-12 15:08:52 -03:00
Davidson Gomes
f5fbf73139
Merge pull request #882 from FaelN1/v2.0.0
refactor: refatora tratamento do tipo de mensagem para interativas, de botão e de contato
2024-09-12 15:07:43 -03:00
Davidson Gomes
ade5f8d122
Merge pull request #880 from joaosouz4dev/v2.0.0
fix: clean instance without chatwoot
2024-09-12 15:04:53 -03:00
Junior Vidotti
83f87bc1c5 debounce message break 2024-09-11 21:58:46 +00:00
Rafael Nicolas Barbosa Moreira
55a3e59fa5 refactor: refatora tratamento do tipo de mensagem para interativas, de botão e de contato 2024-09-11 17:31:10 -03:00
Davidson Gomes
599560bdd7 fix: It is now possible to send images via the Evolution Channel 2024-09-11 17:20:07 -03:00
João Victor Souza
918cf295ad fix: clean instance without chatwoot 2024-09-11 11:03:38 -03:00
Davidson Gomes
bfcf99bba0 Merge branch 'v2.0.0' of github.com:EvolutionAPI/evolution-api into v2.0.0 2024-09-09 10:12:19 -03:00
Davidson Gomes
80ae86b298 fix: chatwoot screen 2024-09-09 10:12:10 -03:00
Felipe Medeiros
65c6ecff88 feat: adiciona headers no cadastro de webhook da instância 2024-09-06 20:46:10 -03:00
Davidson Gomes
c20a3b643f fix: no response evolution bot 2024-09-05 20:52:46 -03:00
Judson Cairo
16a0e6b18e Fix chatwoot not mentioning the quoted message 2024-09-05 09:28:57 -03:00
Davidson Gomes
ff78954383
Revert "V2 fix chatwoot reply quote" 2024-09-05 09:26:33 -03:00
Davidson Gomes
2c7288e888
Merge pull request #865 from judsonjuniorr/v2-rabbitmq-exchange-name
Use exchange name from .env
2024-09-05 09:20:55 -03:00
Davidson Gomes
a97a01e0aa
Merge pull request #864 from judsonjuniorr/v2-on-whatsapp-return
Fix on whatsapp number return
2024-09-05 09:20:29 -03:00
Judson Cairo
65debe5a95 Use exchange name from .env 2024-09-04 17:09:42 -03:00
Judson Cairo
672bdc1cc7 Fix on whatsapp number return 2024-09-04 17:05:07 -03:00
Judson Cairo
71289fb919 Fix chatwoot not mentioning the quoted message 2024-09-04 15:38:11 -03:00
Judson Cairo
b93725dd32 Merge branch 'v2.0.0' into v2 2024-09-04 13:24:12 -03:00
Davidson Gomes
25daec9f41 fix: use chatwoot with evolution channel 2024-09-03 17:23:05 -03:00
Davidson Gomes
849d5f79dc fix: sentry version 2024-09-03 16:53:23 -03:00
Davidson Gomes
73727da867 fix: upload media s3 on waba 2024-09-03 14:41:39 -03:00
Davidson Gomes
401770be1c
Merge pull request #852 from paulillo/fix-wpp-biz-api-upload-media-s3
Fix wpp biz api upload media s3
2024-09-03 14:40:50 -03:00
Davidson Gomes
acd4100b23 fix: fixed bugs in the frontend, on the event screens 2024-09-03 13:09:42 -03:00
Júlio Paulillo
b0aa299850 Hotfixes attribution 2024-09-03 12:25:02 -03:00
Júlio Paulillo
1db339c65f Declares instanceDto.chatwootAutoCreate 2024-09-03 12:13:30 -03:00
Júlio Paulillo
fed49c2072 Fixes wrong message type lookup 2024-09-02 20:39:11 -03:00
Davidson Gomes
5f86f01e3a
Merge pull request #849 from robsoncombr/v2.0.0-robsoncombr-fix-missing-autoCreate
v2.0.0-robsoncombr-fix-missing-autoCreate
2024-09-02 09:38:41 -03:00
Davidson Gomes
951da04373
Merge pull request #839 from judsonjuniorr/v2-is-on-whatsapp-cache
Save is on whatsapp on the database
2024-09-02 09:37:25 -03:00
Judson Cairo
1161a8a0e2 Await chatwoot creation and change log to error 2024-09-01 16:46:09 -03:00
Judson Junior
2cb68b38a9
Merge pull request #20 from robsoncombr/v2.0.0-robsoncombr-fix-missing-autoCreate
v2.0.0-robsoncombr-fix-missing-autoCreate
2024-09-01 16:42:26 -03:00
Robson Martins
265cba9e3e
v2.0.0-robsoncombr-fix-missing-autoCreate 2024-08-31 23:32:15 -03:00
Judson Junior
f17bb4ec42
Merge pull request #19 from EvolutionAPI/v2.0.0
changelog
2024-08-31 21:35:52 -03:00
Davidson Gomes
f0840e07fe changelog 2024-08-30 11:38:41 -03:00
Judson Junior
47d56f9c52
Merge pull request #18 from judsonjuniorr/v2-is-on-whatsapp-cache
V2 is on whatsapp cache
2024-08-30 10:38:55 -03:00
Davidson Gomes
256bd3ef73
Merge pull request #838 from judsonjuniorr/v2-fix-cache-errors
Validate if cache exists before accessing it
2024-08-30 09:39:13 -03:00
Judson Cairo
7a76600cd6 Added redis cache for on whatsapp & TTL on .env 2024-08-28 12:11:32 -03:00
Judson Cairo
ce6438b9a8 Save is on whatsapp on the database 2024-08-28 11:19:47 -03:00
Judson Cairo
a19343d3e1 Validate if cache exists before accessing it 2024-08-28 09:59:40 -03:00
@milesibastos
0989f8a3ad feat: Define a global proxy to be used if the instance does not have one 2024-08-27 21:01:48 -03:00
Deivison Lincoln
b19c5375e5 [Proposta] Alterar level dos Logs do cache para verbose 2024-08-27 14:01:26 -03:00
Yan Teixeira
a44aa1f646 remove whitespaces 2024-08-27 01:34:25 -03:00
Yan Teixeira
d712cbc467 fix agents dify integration 2024-08-27 01:20:02 -03:00
Davidson Gomes
b8d6e55fba fix: change answer to message on Evolution Bot 2024-08-26 15:32:44 -03:00
Davidson Gomes
d776770d09 refactor: evolution bot 2024-08-25 10:22:22 -03:00
Davidson Gomes
c531906de2 fix: duplicated bot when use startTypebot 2024-08-24 14:57:54 -03:00
Davidson Gomes
e8fa952de5 fix: update description on chatbots 2024-08-24 14:36:00 -03:00
Davidson Gomes
aeea61ef4b fix: get integrations sessions by type 2024-08-24 13:18:58 -03:00
Davidson Gomes
a9c737da3f fix: chatbot services 2024-08-24 08:01:42 -03:00
Davidson Gomes
2344dfc22f fix: chatbot services 2024-08-24 07:44:23 -03:00
Diego Marino
aa79409d44 Implement externalAdReplyBody for Meta Ads
Receive Instagram/Facebook Ads messages for recognizing in messages to use in Dify(example).
2024-08-23 21:35:41 -03:00
Davidson Gomes
5d6a34ad3f fix: websocket emit 2024-08-23 16:57:44 -03:00
Davidson Gomes
1b9fec6c27 fix: s3 saving media sent from me 2024-08-23 15:48:34 -03:00
Davidson Gomes
e809f38865 fix: fixed send messages in groups 2024-08-23 15:36:59 -03:00
Davidson Gomes
0fca8c0746 fix: set events 2024-08-23 14:56:33 -03:00
Davidson Gomes
d7b3230db9 break change: fix breakchange events in manager 2024-08-23 14:30:48 -03:00
Davidson Gomes
fcdee75f39 fix: set webhook 2024-08-23 14:24:32 -03:00
Davidson Gomes
1f0a5a2e09 fix: fixed proxy config in manager 2024-08-23 14:05:48 -03:00
Davidson Gomes
6a62ae85fc refactor: integration folders and fix manager bugs 2024-08-23 13:46:51 -03:00
Davidson Gomes
beafc62403 refactor: integration folders 2024-08-23 13:20:18 -03:00
Stênio Aníbal
9418faff30 Merge branch 'ev2' into v2.0.0 2024-08-23 11:41:28 -03:00
Stênio Aníbal
99161de094 Fix intrinsic type issues on chatbot controllers 2024-08-23 11:41:14 -03:00
Davidson Gomes
c3c1ffe7e5 fix: manager translate 2024-08-23 11:10:55 -03:00
Stênio Aníbal
03c32de743 Merge branch 'ev2' into v2.0.0 2024-08-23 10:56:17 -03:00
Stênio Aníbal
05ee65f422 Simplify events structure and fix minor issues 2024-08-23 10:53:31 -03:00
Davidson Gomes
6328c64192 fix: messageType null 2024-08-23 08:35:00 -03:00
Davidson Gomes
a83a358620 refactor: channel integration folders 2024-08-23 07:55:26 -03:00
Davidson Gomes
fff11ea452 fix: update baileys version 2024-08-22 23:08:42 -03:00
Davidson Gomes
0e9cd21981 feat: evolution channel in instance create 2024-08-22 19:49:51 -03:00
Davidson Gomes
2196f65b7a fix: dify agent integration 2024-08-22 18:15:30 -03:00
Davidson Gomes
0e6a78d011 feat: flowise integration 2024-08-21 17:21:23 -03:00
Davidson Gomes
61523c0a79 feat: generic chatbot 2024-08-21 16:37:24 -03:00
Stênio Aníbal
beb7942d7c Merge branch 'ev2' into v2.0.0 2024-08-21 15:02:52 -03:00
Stênio Aníbal
cca063dfed Fix not found event message for the event services 2024-08-21 15:02:40 -03:00
Davidson Gomes
16bc363d5f refactor: openai services 2024-08-21 14:58:48 -03:00
Stênio Aníbal
4aac2da253 Merge branch 'ev2' into v2.0.0 2024-08-21 14:56:55 -03:00
Stênio Aníbal
0aeecde847 Add BOT_CONTACT env option to Chatwoot 2024-08-21 14:56:41 -03:00
Stênio Aníbal
912df56c55 Remove event emit from channel service preventing exceptions 2024-08-21 14:56:12 -03:00
Stênio Aníbal
6585e8f0c2 Fix events structure to prevent "Instance not found" exception 2024-08-21 14:55:18 -03:00
Davidson Gomes
1bf76ecb94 refactor: dify services 2024-08-21 14:48:59 -03:00
Davidson Gomes
35bde8498b feat: generic chatbot 2024-08-21 14:42:26 -03:00
Davidson Gomes
73d65b0eb6
Merge branch 'v2.0.0' into v2-webhook-fix 2024-08-21 14:01:09 -03:00
Davidson Gomes
e7d971867b refactor: chatbot integration 2024-08-21 13:52:09 -03:00
Davidson Gomes
9209c9992d refactor: event integration 2024-08-21 13:47:41 -03:00
Davidson Gomes
edeb1efd2a refactor: chatbot integration 2024-08-21 13:37:22 -03:00
Judson Cairo
dcef6919cb Fix webhook validation 2024-08-21 11:04:18 -03:00
Davidson Gomes
8876797172 refactor: openai integration 2024-08-21 09:29:49 -03:00
Davidson Gomes
b58ad83c12
Merge pull request #800 from dev-luizf/fix/manage-webhook
Fix webhook creation
2024-08-21 07:23:04 -03:00
dev-luizf
68f57aa507 fix: fix webhook integration 2024-08-20 18:48:17 -03:00
Davidson Gomes
583ce33868 refactor: channel controller 2024-08-20 18:47:24 -03:00
Davidson Gomes
3b39f13180 refactor: adjusts in module init 2024-08-20 18:41:12 -03:00
Davidson Gomes
2ec0b842c1 refactor: integrations folder 2024-08-20 16:22:02 -03:00
Davidson Gomes
884362e70c refactor: channel folder 2024-08-20 15:49:32 -03:00
Davidson Gomes
df77aadd04 refactor: event folder 2024-08-20 15:36:55 -03:00
Davidson Gomes
7b79591e42 refactor: event folder 2024-08-20 15:27:32 -03:00
Davidson Gomes
64ed0faa83 refactor: integrations router folder structure 2024-08-20 13:13:49 -03:00
Davidson Gomes
d68d42b984 refactor: integrations folder structure 2024-08-20 12:27:04 -03:00
Stênio Aníbal
ec9e227413 Merge branch 'ev2' into v2.0.0 2024-08-20 11:26:34 -03:00
Stênio Aníbal
82634c0cb2 Merge websocket new events to the defaults 2024-08-20 11:26:05 -03:00
Davidson Gomes
8b5b4994f2
Merge pull request #789 from stenioanibal/v2.0.0
V2.0.0 - Refactor websocket structure
2024-08-20 11:19:36 -03:00
Davidson Gomes
ff52be5ac5 chore: adjusts in env for manager 2024-08-20 08:56:30 -03:00
Davidson Gomes
046c64c65d feat: translation in manager: English, Portuguese, Spanish and French 2024-08-20 07:29:14 -03:00
Davidson Gomes
9ae5255d5f fix: send pushName for openai assistant 2024-08-19 11:25:42 -03:00
Davidson Gomes
87a5663da7
Merge pull request #790 from judsonjuniorr/v2-advanced-operators-triggers
Advanced operators trigger for OpenAI/Dify/Typebot
2024-08-19 11:14:08 -03:00
Matheus Almeida
0cfd143db0 feat: adicionada capacidade de OpenAI para interpretar o contexto de contatos de maneira mais precisa 2024-08-17 23:03:55 -03:00
Judson Cairo
fcd038924d Advanced operators trigger fro OpenAI/Dify/Typebot 2024-08-17 08:32:05 -03:00
Stênio Aníbal
cb36f04534 Remove unused import and bad additional websocket event 2024-08-16 18:31:02 -03:00
Stênio Aníbal
fbff945d5b Merge branch 'ev2' into v2.0.0 2024-08-16 17:46:14 -03:00
Stênio Aníbal
dc04eb16fc Refactor websocket structure 2024-08-16 17:45:09 -03:00
Davidson Gomes
a77fa414e5 changelog 2024-08-16 17:07:34 -03:00
Davidson Gomes
b921a4d324 feat: IA send images and Sentry implemented 2024-08-16 11:31:46 -03:00
Davidson Gomes
3ef80bd6c5 feat: openai send images 2024-08-16 07:23:34 -03:00
Davidson Gomes
fb93c890ca feat: dify send images 2024-08-15 20:24:57 -03:00
Davidson Gomes
19f0296718 fix: chatwoot translations and s3 region 2024-08-15 15:41:30 -03:00
Davidson Gomes
38ec114fff
Merge pull request #779 from fabioselau077/bugfix/s3_upload_files
[v2] - Região no S3 e fix do size no uploadFile
2024-08-15 15:34:34 -03:00
Davidson Gomes
785a72cbc8 feat: openai now identifies images 2024-08-15 12:29:08 -03:00
Fabio
b475d1d5ea set region from env and fix size in uploadFile 2024-08-15 11:26:30 -04:00
Stênio Aníbal
000d8fd436 Merge branch 'ev2' into v2.0.0 2024-08-15 11:49:42 -03:00
Davidson Gomes
061696e140 feat: dify now identifies images 2024-08-15 11:12:07 -03:00
Stênio Aníbal
16b910f955 Merge branch 'ev2' into v2.0.0 2024-08-15 10:12:44 -03:00
Judson Cairo
1059c92583 Unification of integrations, Typebot & OpenAI & Dify 2024-08-14 17:47:31 -03:00
Stênio Aníbal
2772c2f31f Merge branch 'ev2' into v2.0.0 2024-08-14 17:02:40 -03:00
Davidson Gomes
360f8066a7 fix: crypto.randumUUID is not a function on Manager 2024-08-14 16:01:14 -03:00
Davidson Gomes
b3991cf6bb feat: Added ignoreJids in chatwoot settings 2024-08-14 14:59:47 -03:00
Davidson Gomes
1d31f533f4 Merge branch 'v2.0.0' of github.com:EvolutionAPI/evolution-api into v2.0.0 2024-08-14 11:28:33 -03:00
Davidson Gomes
881a011493 chore: Deprecate buttons and list in new Baileys version
Updated CHANGELOG.md, package.json, src/api/dto/chat.dto.ts, and src/api/services/channels/whatsapp.baileys.service.ts to deprecate buttons and list due to the new Baileys version. This change improves compatibility and maintainability of the codebase.
2024-08-14 11:27:54 -03:00
Stênio Aníbal
707ac9db2c Fix cors settings for websocket when it's set for any origin 2024-08-14 10:36:48 -03:00
Davidson Gomes
78da13fcab
Merge pull request #759 from judsonjuniorr/V2-duplicated-label-creation
Changed labels to be unique on the same instance
2024-08-13 15:56:24 -03:00
Judson Cairo
f0a6fb111e Removed console.log 2024-08-13 10:23:39 -03:00
Judson Cairo
48febec36a Changed labels to be unique on the same instance 2024-08-12 21:35:31 -03:00
Judson Cairo
041b3c5e1f Remove instance from redis even if using database 2024-08-12 21:03:51 -03:00
Davidson Gomes
dbb6ea9147 fix: adjusts 2.0.9 2024-08-12 13:24:19 -03:00
Davidson Gomes
6800b63945
Merge pull request #750 from judsonjuniorr/v2-path-mappings
V2 Path mapping & deps fix & bundler changed to tsup
2024-08-12 09:43:08 -03:00
Davidson Gomes
404edaa4e1
Merge pull request #747 from judsonjuniorr/v2-update-contacts-database
V2 update contacts database
2024-08-12 09:41:18 -03:00
Judson Cairo
32e58debc6 Path mapping & deps fix & bundler changed to tsup 2024-08-11 20:47:17 -03:00
Judson Cairo
7b1e4e9e3d Add chat name to fetch chats request 2024-08-11 15:49:43 -03:00
Judson Cairo
54e47c09c4 Fixed contacts update in the database 2024-08-10 23:43:53 -03:00
Judson Cairo
d31b2c7f97 Remove unnecessary logs 2024-08-10 23:16:14 -03:00
Judson Cairo
926197b1ba Save chat names for groups identification 2024-08-10 23:15:20 -03:00
Judson Cairo
668f477218 Validate if session exists before deleting it 2024-08-10 23:15:02 -03:00
Davidson Gomes
0f299993d9 chore: adjusts in docker files 2024-08-09 12:41:16 -03:00
Davidson Gomes
e7ff09752e fix: StopBotFromMe working with chatwoot 2024-08-09 09:55:50 -03:00
Davidson Gomes
9367be0fb1 chore: adjusting details 2024-08-09 06:53:43 -03:00
Davidson Gomes
56a165db54 feat: added general session button in typebot, dify and openai in manager 2024-08-08 23:14:51 -03:00
Davidson Gomes
9329330297
Merge pull request #744 from rcesar/v2.0.0
Fix conversationId when is dify agent
2024-08-08 22:16:34 -03:00
Davidson Gomes
4d9f6ef416 fix: import contacts with image in chatwoot 2024-08-08 22:09:23 -03:00
Davidson Gomes
6f2971cf24 feat: function for openai assistant added 2024-08-08 19:35:32 -03:00
Davidson Gomes
df3092b876 changelog 2024-08-08 19:24:51 -03:00
Davidson Gomes
26a974a239 feat: function for openai assistant added 2024-08-08 18:47:52 -03:00
Davidson Gomes
e7ca3cf254 Merge branch 'v2.0.0' of github.com:EvolutionAPI/evolution-api into v2.0.0 2024-08-08 17:51:27 -03:00
Davidson Gomes
59edf4ffb7 feat: Variables passed to the input in dify 2024-08-08 17:51:12 -03:00
Renan Cesar
0e4034ffac Fix conversationId when is dify agent 2024-08-08 16:28:40 -03:00
Felipe Medeiros
1c3bea4225 feat: add disconnection information to BaileysStartupService and Instance model
- Updated BaileysStartupService to include disconnection handling logic.
- Enhanced Instance model to store disconnection status and details.
2024-08-06 10:38:53 -03:00
Felipe Medeiros
258f56759c refactor: update reconnection logic to prevent reconnection in cases of banishment or blocking
Handled specific errors to improve reconnection logic:
- 401: Triggered logout to handle unauthorized access.
- 402: Recognized as temporary ban, reconnection attempts paused.
- 403: Recognized as forbidden, reconnection attempts stopped.
- 406: Recognized as permanent ban, reconnection attempts halted.
2024-08-06 01:48:42 -03:00
Davidson Gomes
de8e4a0ca3 fix(dify agent integration): Updated dify agent integration to use streaming response mode and handle message data in chunks. Modified CHANGELOG.md and src/api/integrations/dify/services/dify.service.ts.
This commit addresses an issue with the dify agent integration by updating it to use a streaming response mode. This allows for handling message data in smaller chunks, improving performance and reducing memory usage. The commit also includes updates to the CHANGELOG.md file and the dify.service.ts file, where the actual changes were implemented.
2024-08-03 14:04:39 -03:00
Davidson Gomes
2aa0e08ae4 fix: Added description column on typebot, dify and openai 2024-08-03 13:51:24 -03:00
Davidson Gomes
9c5eb4bfd1 fix: Session is now individual per instance and remoteJid
Changes made:
- Added `instanceId` to sessions in DifyService, OpenaiService, and TypebotService to ensure that sessions are individual per instance and remoteJid.
- Decreased delay time in BaileysStartupService from 2000ms to 1000ms.

The bug fix ensures that sessions are unique per instance and remoteJid, which improves the overall functionality of the application. The delay time reduction in BaileysStartupService speeds up the pairing code request process.

The modified files are DifyService, OpenaiService, TypebotService, and BaileysStartupService.
2024-08-03 13:36:31 -03:00
Davidson Gomes
819ef70b7b fix: Resolve issue with connecting to instance
Corrected an issue with connecting to the instance by updating the connection status in the Whatsapp Baileys service.

Modified files:
- Whatsapp Baileys service (src/api/services/channels/whatsapp.baileys.service.ts)
2024-08-03 13:20:22 -03:00
Davidson Gomes
9f2801d289 Fix: Resolved issue with connecting to instance
Modified: index.router.ts, whatsapp.baileys.service.ts

Fixed an issue with connecting to the instance by modifying the code in index.router.ts and whatsapp.baileys.service.ts. This change resolves a critical problem that was preventing the application from connecting to the necessary instance.
2024-08-03 13:17:02 -03:00
Davidson Gomes
c6db03ffa2 fix: Adjusts in restart instance 2024-08-03 12:54:23 -03:00
Davidson Gomes
7ad96f54ca fix: update typebot, openai and dify 2024-08-02 19:42:54 -03:00
Davidson Gomes
671b677569 fix: fetchInstances with clientName parameter 2024-08-02 19:22:44 -03:00
Davidson Gomes
3fa6b1fcc5 fix: get models openai 2024-08-02 10:49:06 -03:00
Davidson Gomes
67409e1bf5 Add speech-to-text functionality using OpenAI
This commit introduces a new feature that transcribes audio messages to text using OpenAI's Whisper model. The following files were modified to implement this feature:

- `CHANGELOG.md`: Added a new entry under the 'Features' section to document the speech-to-text functionality.
- `prisma/postgresql-schema.prisma`: Added a new boolean field `speechToText` to the `OpenaiSetting` model.
- `src/api/integrations/openai/dto/openai.dto.ts`: Added a new optional boolean property `speechToText` to the `OpenaiSettingDto` class.
- `src/api/integrations/openai/services/openai.service.ts`: Implemented the `speechToText` method to handle the transcription process.
- `src/api/integrations/openai/validate/openai.schema.ts`: Added a new required boolean schema for the `speechToText` property in the `openaiSettingSchema`.
- `src/api/integrations/typebot/services/typebot.service.ts`: Updated the `audioMessage` property to consider the new `speechToText` field.
- `src/api/services/channels/whatsapp.baileys.service.ts` and `src/api/services/channels/whatsapp.business.service.ts`: Added logic to handle the transcription of audio messages when the `speechToText` setting is enabled.

The purpose of this change is to provide a more accessible way for users to interact with audio messages by converting them to text. This improvement will be particularly useful for users with hearing impairments or those in noisy environments.
2024-08-01 17:15:20 -03:00
Davidson Gomes
a49c63bc2b chore: Update CHANGELOG and API routes
Updated CHANGELOG.md with details of the current release.
Modified src/api/routes/index.router.ts to improve the API routing.

These changes are part of the ongoing maintenance and improvement of the project.
2024-07-30 18:38:13 -03:00
Davidson Gomes
8118c68dce v2.0.4-rc 2024-07-30 17:07:45 -03:00
Davidson Gomes
bb65b566e5 chore: Update dify and openai services
Modified the implementation of Dify and OpenAI services to improve overall functionality. These changes aim to enhance the stability and performance of the integration layer, although no new features have been added.

Changes affected the following files:
- dify.service.ts
- openai.service.ts
2024-07-30 15:38:27 -03:00
Davidson Gomes
881c1c2aa6 v2.0.4-rc 2024-07-30 14:52:19 -03:00
Davidson Gomes
a5d72a0dfd feat: Integration with Dify
Adds support for Dify integration, including new routes, services, and controllers. The configuration for Dify has been added to the environment file, and the necessary changes have been made to the `.env.example` file. Additionally, the WhatsApp Baileys service has been updated to handle Dify notifications.

Modified files:
- `.env.example`
- `package.json`
- `src/api/integrations/openai/services/openai.service.ts`
- `src/api/routes/index.router.ts`
- `src/api/server.module.ts`
- `src/api/services/channel.service.ts`
- `src/api/services/channels/whatsapp.baileys.service.ts`
- `src/config/env.config.ts`
- `src/validate/validate.schema.ts`

Introduced files:
- `src/api/integrations/dify/`
- `src/api/integrations/dify/controllers/dify.controller.ts`
- `src/api/integrations/dify/dto/dify.dto.ts`
- `src/api/integrations/dify/routes/dify.router.ts`
- `src/api/integrations/dify/services/dify.service.ts`
- `src/api/integrations/dify/validate/dify.schema.ts`
2024-07-30 13:34:35 -03:00
Davidson Gomes
66814b403e chore: Update monitor service and instance controller
Refactored the instance controller and monitor service to improve the connection handling and management of WhatsApp instances.

- Modified the instance controller to close the WebSocket connection and restart the instance instead of reloading it.
- Updated the monitor service to remove the instance from the `waInstances` object and emit an event to clean up and remove the instance data.
- Fixed an issue where the instance was not being removed from the `waInstances` object.

Files affected:
- CHANGELOG.md
- src/api/controllers/instance.controller.ts
- src/api/services/monitor.service.ts
2024-07-30 11:15:21 -03:00
Davidson Gomes
95bc5e6b21 chore: Updated dependencies and added new manager
In this commit, the following changes were made:

- Updated the version of the project to 2.0.4-beta.
- Added the new manager with version 2.0.0.
- Updated the Baileys version.
- Modified several files such as CHANGELOG.md, Dockerfile, package.json, src/api/routes/index.router.ts, and src/api/routes/view.router.ts.
- Deleted the views/manager.hbs file and added the manager/ folder.

These changes update the dependencies and include a new manager, which may impact the application's functionality.
2024-07-30 09:17:49 -03:00
Davidson Gomes
5047e6281a fix: Correct openai session deletion and pause functionality
This commit fixes an issue where openai sessions were not being properly deleted or paused. It updates the `openai.service.ts` and `openai.schema.ts` files to correctly handle session deletion and pausing.

The `openai.service.ts` file now includes additional checks for session status before deleting or updating. The `openai.schema.ts` file has been updated to include a new 'delete' status option.

These changes ensure that openai sessions are properly managed and that the bot can be paused and resumed as intended. This improves the overall functionality and user experience of the application.
2024-07-29 19:07:26 -03:00