iachat/app/helpers
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
..
api feat: Allow users to see heatmap for last 30 days (#10848) 2025-02-19 14:54:15 -08:00
filters chore: Ability to filter conversations with priority (#10967) 2025-03-03 16:38:22 +05:30
instagram feat: Added the ability to create Instagram channel (#11182) 2025-04-03 13:57:14 +05:30
linear feat: move Linear config to installation_config (#10999) 2025-02-28 14:20:27 +05:30
shopify feat(apps): Shopify Integration (#11101) 2025-03-19 15:37:55 -07:00
super_admin chore: Clean up the feature presentation in super admin (#10949) 2025-02-21 17:01:36 -08:00
application_helper.rb feat: Add help URLs for features in features.yml (#9134) 2024-03-21 10:30:46 -07:00
billing_helper.rb feat: Upgrade page instead of banner (#11202) 2025-03-28 02:28:17 -07:00
cache_keys_helper.rb feat: baileys provider for whatsapp (#7) 2025-04-03 23:28:38 -03:00
contact_helper.rb feat: Add contact helper (#8989) 2024-03-06 17:39:39 +05:30
date_range_helper.rb fix: inconsistency in report and summary for metric counts (#6817) 2023-04-20 12:55:04 +05:30
email_helper.rb feat: Enable template variables in channel greeting messages (#6971) 2023-04-26 20:23:46 +05:30
file_type_helper.rb fix: check the content type for the file when uploading from cloud storage (#5378) 2022-10-21 18:05:36 -07:00
frontend_urls_helper.rb 🚨Fix Rubocop lint errors 2019-10-20 14:17:26 +05:30
home_helper.rb Initial Commit 2019-08-14 15:18:44 +05:30
message_format_helper.rb feat: Adds support for superscript in help center articles (#7279) 2023-06-14 15:39:00 +05:30
portal_helper.rb chore: Remove the background SVG from the help center (#10857) 2025-02-11 18:58:36 +05:30
report_helper.rb feat: Add backend APIs for the bot metrics (#9031) 2024-03-01 08:20:20 -08:00
reporting_event_helper.rb chore: lint files (#2) 2025-04-03 23:28:38 -03:00
timezone_helper.rb chore: lint files (#2) 2025-04-03 23:28:38 -03:00
widget_helper.rb chore: Enhance contact merge action for identified users (#4886) 2022-06-23 15:48:56 +05:30