iachat/app/services
Cayo P. R. Oliveira acd1e56a28 feat: baileys provider for whatsapp (#7)
* feat: baileys provider and placeholder for link device modal

* chore: drop qrcode.vue in favor of just img tag

* chore: update modal props

* feat: setup channel provider connection

* chore: update .env.example with Baileys API default configuration

* feat: add support for Baileys provider in WhatsApp events processing

* chore: rename Baileys API default host variable to DEFAULT_BAILEYS_URL

* feat: add setup and disconnect methods for Baileys channel provider in inboxes controller that will be implemented

* feat: add CHANNEL_CONNECTION_UPDATE event and include it in broadcast data preparation

* refactor: simplify channel retrieval logic in WhatsappEventsJob

* refactor: revert CHANNEL_UPDATE_EVENTS constant from ActionCableBroadcastJob

* feat: add 'baileys' as a provider option in Whatsapp channel model

* feat: add provider_connection field to Whatsapp channel model and migration

* refactor: remove unnecessary  CHANNEL_CONNECTION_UPDATE event type

* feat: implement channel provider connection with baileys API

* feat: add inbox association to Whatsapp channel model and update webhook URL handling

* feat: enhance Baileys service to handle webhook multiple event types

* refactor: simplify webhook verification logic in Baileys service

* feat: add setup channel provider call, and refactor some logic

* chore: adapt logic to new API

* refactor: fix typo

* refactor: fix import

* refactor: fix typo

* chore: add fixme comment about race condition

* fix: remove double disconnect call

* feat: implement message processing for incoming WhatsApp messages

* refactor: streamline message type determination and improve readability

* chore: increase cache key granularity

provider connection info might be updated multiple times within 1 second, so updates might be lost due to cache key not being updated. changing cache key to milliseconds solves this

* feat: add `is-loading` to buttons

* feat: update send_message method to use 'to' parameter and improve error handling

* refactor: simplify test setup and update API key in specs

* chore: add setup and disconnect channel provider specs

* test: fix spec after increase cache key granularity

* feat: handle reconnecting state on modal

* style: centered error text

* feat: advanced options on create inbox

* feat: handle new reconnecting on backend

* refactor: update inbox controller specs and leave a FIXME note

* test: add specs for Whatsapp::IncomingMessageBaileysService

* feat: add baileys configuration page

* feat: link device button when disconnected on conversation

* chore: refactor .env.example

* feat: add TODO for unimplemented methods in IncomingMessageBaileysService

* fix: correct method name and update environment variable references in WhatsappBaileysService

* refactor: simplify channel lookup by removing redundant method and handling phone number check directly

* chore: add TODO for unimplemented event processing methods in IncomingMessageBaileysService

* fix: update environment variable references in WhatsappBaileysService tests

* chore(webhook): add pt-BR translations

* chore: add pt-br translations

* chore: inboxname component margin

* refactor: inboxname computed prop

* feat: enhance WhatsApp provider connection handling and message processing

* test: inbox controller

* chore: improve baileys connection and messages handling

* test: incoming message service baileys

* refactor: update provider config validation and improve test setup for WhatsApp Baileys service

* fix: ensure only text messages are sent and update message source ID

* fix: create message

* fix: only update message on success

* test: fix broken specs

* chore: raise error on unsupported message content type

* feat: hide provider connection data from non-admins

* fix: update advanced options

* chore: move class definition

* fix: issue with send_message not returning id

---------

Co-authored-by: gabrieljablonski <contact@gabrieljablonski.com>
2025-04-03 23:28:38 -03:00
..
agent_bots Exception tracker with account (#6603) 2023-03-03 12:14:44 +05:30
auto_assignment chore: lint files (#2) 2025-04-03 23:28:38 -03:00
automation_rules feat: validate query conditions (#10595) 2024-12-17 17:16:37 +05:30
base chore: Add cache to improve widget performance (#11163) 2025-03-24 16:04:49 -07:00
contacts fix: Add support for named parameter templates in WhatsApp (#11198) 2025-03-28 14:07:03 -07:00
conversations chore(refactor): Improve conversation permission filtering (#11166) 2025-03-31 19:30:02 -07:00
data_import fix: downcase email before finding (#8921) 2024-02-21 18:51:00 +05:30
email_templates chore: Fix emails being sent with the wrong translations (#2236) 2021-06-08 22:45:01 +05:30
facebook feat: handle Channel errors (#11015) 2025-03-06 20:09:47 +05:30
geocoder fix: ip-lookup database lazy loading for all environments (#8052) 2024-10-22 23:18:30 -07:00
google feat: add Google Email fetch and OAuth token refresh service (#9603) 2024-06-11 14:22:03 +05:30
imap feat: add Google Email fetch and OAuth token refresh service (#9603) 2024-06-11 14:22:03 +05:30
instagram feat: Added the ability to create Instagram channel (#11182) 2025-04-03 13:57:14 +05:30
internal feat: add job to remove stale contacts and contact_inboxes (#11186) 2025-03-28 12:18:39 +05:30
labels fix: Update associations when a label is updated (#3046) 2021-09-21 10:16:32 +05:30
line chore: lint files (#2) 2025-04-03 23:28:38 -03:00
llm_formatter feat(ee): Add Captain features (#10665) 2025-01-14 16:15:47 -08:00
macros feat: Add webhook event support for macros (#11235) 2025-04-02 20:26:55 -07:00
message_templates chore: lint files (#2) 2025-04-03 23:28:38 -03:00
messages fix: Prevent duplicate notifications for mentions (#10675) 2025-01-13 11:20:31 +05:30
microsoft feat: add Google Email fetch and OAuth token refresh service (#9603) 2024-06-11 14:22:03 +05:30
notification chore: Disable email notifications for unconfirmed users (#10964) 2025-02-24 12:14:40 -08:00
sms feat: Bandwidth sms channel delivery reports (#8198) 2023-10-27 14:07:15 -07:00
telegram feat: Show shared contact's name in Telegram channel (#10856) 2025-02-11 19:39:54 +05:30
twilio fix: Twilio channel attachment issues (#10167) 2024-09-25 18:03:28 -07:00
twitter chore: Use "create!" and "save!" bang methods when not checking the result (#5358) 2022-09-13 17:40:06 +05:30
whatsapp feat: baileys provider for whatsapp (#7) 2025-04-03 23:28:38 -03:00
widget chore: Update method to access "secret_key_base" (#7337) 2023-06-19 16:11:19 +05:30
action_service.rb feat: Add the ability to un-assign teams using automation (#9668) 2024-06-26 12:40:36 -07:00
base_refresh_oauth_token_service.rb feat: add Google Email fetch and OAuth token refresh service (#9603) 2024-06-11 14:22:03 +05:30
filter_service.rb chore: Ability to filter conversations with priority (#10967) 2025-03-03 16:38:22 +05:30
ip_lookup_service.rb feat(poc): Disable widget based on country (#6658) 2023-03-14 09:09:57 -07:00
search_service.rb chore: remove logging from search service (#11112) 2025-03-19 19:10:25 +05:30