iachat/app/services
Cayo P. R. Oliveira 8fc14186e0
feat: process Baileys attachments, fix contact name creation, and handle unsupported messages (#26)
* fix: return not_found status for missing messages in WhatsApp webhook

* feat: enhance message handling to support image attachments

* chore: Handle incoming whatsapp baileys service attachments and implement specs for images and videos

* fix: add file_content_type method to incoming baileys messages

* chore: specs for stickers, audio and files

* fix: handle media attachment errors

* chore: convert file_content_type to string when attaching media

* fix: add handling for attachment not found error in incoming message service

* chore: refactor file_content_type method and simplify filename method

* chore: update media attachment tests

* feat: baileys unsupported message alert (#27)

* feat: create alert message for unsupported message types

* chore: fail message when try send not supported type in baileys

* chore: add tests for unsupported message handling in Baileys service

* chore: correct spelling

* chore: NIT in spec name

* chore: remove unnecessary message reload in unsupported message type test

* feat: baileys support to send attachments (#28)

* feat: enhance message sending logic with support for attachments and interactive messages

* fix: update message format to use messageContent for text messages

* feat: attachment message sending

* fix: use strict encoding for attachment file download

* chore: streamline message sending logic and remove unused error classes

* chore: remove type from message sending logic

* chore: update message sending specs

* chore: raise MessageNotSentError instead of updating message status to failed

* chore: change baileys contact name preferences (#30)

* refactor: improve contact name handling and extraction from JID

* test: enhance message handling to update contact names based on pushName and verifiedBizName

* chore: update contact name condition to match phone number from JID

* chore: correct method name typo

* chore: correct variable names for phone number consistency in tests

* chore: update message payload structure and improve error handling in send_message

* test: re-add testing for error handling

* feat: enhance contact name handling and add self-message detection

* fix: ensure presence check for verified business name in contact name retrieval

* test: improve specs

---------

Co-authored-by: gabrieljablonski <contact@gabrieljablonski.com>

---------

Co-authored-by: gabrieljablonski <contact@gabrieljablonski.com>
Co-authored-by: Gabriel Jablonski <gabriel@fazer.ai>

---------

Co-authored-by: gabrieljablonski <contact@gabrieljablonski.com>
Co-authored-by: Gabriel Jablonski <gabriel@fazer.ai>

* fix: try to disconnect baileys before destroy inbox (#29)

* fix: ensure proper disconnection of Baileys provider on channel destruction

* test: add callback tests for disconnecting channel provider in Whatsapp spec

* refactor: simplify condition for disconnecting Baileys provider on channel destruction

* refactor: enhance disconnect_channel_provider specs for Baileys provider

* test: verify channel destruction does not call disconnect_channel_provider

---------

Co-authored-by: gabrieljablonski <contact@gabrieljablonski.com>

---------

Co-authored-by: gabrieljablonski <contact@gabrieljablonski.com>
Co-authored-by: Gabriel Jablonski <gabriel@fazer.ai>
2025-04-25 16:39:17 -03:00
..
agent_bots Exception tracker with account (#6603) 2023-03-03 12:14:44 +05:30
auto_assignment chore: apply Rails/SaveBang cop (#15) 2025-04-03 23:29:24 -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 chore: apply Rails/SaveBang cop (#15) 2025-04-03 23:29:24 -03:00
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: Instagram Inbox using Instagram Business Login (#11054) 2025-04-08 10:47:41 +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 chore: apply Rails/SaveBang cop (#15) 2025-04-03 23:29:24 -03: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: process Baileys attachments, fix contact name creation, and handle unsupported messages (#26) 2025-04-25 16:39:17 -03:00
widget chore: Update method to access "secret_key_base" (#7337) 2023-06-19 16:11:19 +05:30
action_service.rb chore: apply Rails/SaveBang cop (#15) 2025-04-03 23:29:24 -03: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