24 Commits

Author SHA1 Message Date
Sojan Jose
ec9a82a017 feat: Open conversation when agent bot webhook fails (#12379)
# Changelog

When an agent bot webhook fails, we now flip any pending conversation
back to an open state so a human agent can pick
it up immediately. There will be an clear activity message giving the
team clear visibility into what went
wrong. This keeps customers from getting stuck in limbo when their
connected bot goes offline.

# Testing instructions 

1. Initial setup: Create an agent bot with a working webhook URL and
connect it to a test inbox. Send a message from a
contact (e.g., via the widget) so a conversation is created; it should
enter the Pending state while the bot handles
     the reply.
2. Introduce failure: Edit that agent bot and swap the webhook URL for a
dummy endpoint that will fail. Have the same
contact send another message in the existing conversation. Because the
webhook call now fails, the conversation should flip from Pending back
to Open, making it visible to agents. Also verify the activity message
3. New conversation check: With the dummy URL still in place, start a
brand-new conversation from a contact. When the
bot tries (and fails) to respond, confirm that the conversation appears
immediately as Open rather than remaining Pending. Also the activity
message is visible
4. Subsequent messages in open conversations will show no change

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2025-10-13 15:59:59 +05:30
Sojan Jose
970e76ace8 feat: API Endpoints to update message status (#11387)
- Added an api endpoint for update message status ( available only for
api inboxes )
- Moved message status management to a service. 
- Handles case where read status arrive before delivered 

fixes: #10314 , #9962
2025-04-29 15:33:11 -07:00
Muhsin Keloth
3eb1d49577 fix: Handle all types of errors in API channel webhooks (#8307) 2023-11-07 12:54:49 +05:30
Muhsin Keloth
b4d20689b7 feat: Mark the messages as failed if the API channel webhooks fail for any reason. (#8277) 2023-11-04 12:26:28 +05:30
Sojan Jose
abe57873db chore: Disable throwing Webhook exceptions to Sentry (#6663)
- There is little value in throwing the third-party webhook-related exceptions to sentry. Let's rather write it to logs instead.
2023-03-14 17:40:40 +05:30
Sojan Jose
04dfb034cc chore: Upgrade Exception tracking (#4638)
- Upgrade Sentry Libraries
- Enable provision for account and user info in error tracking
- Add ChatwootExceptionTracker

fixes: #4375
2022-05-09 14:23:19 +05:30
Sojan Jose
8d2b719dc1 chore: Sentry issues (#4623)
Fixes various issues reported on sentry

- Twilio channel creation validation errors
- Room Channel error with nil class
- Webhook Uri exception
2022-05-06 14:50:55 +05:30
Tejaswini Chile
9984edd3ef Feat: Manage conversation for tweets based on the tweet flag (#3353)
Add tweet conversation only if tweets are enabled.

Fixes #1961
2021-12-16 00:24:50 +05:30
Sojan Jose
69f55a25b6 chore: Minor API fixes (#3290)
- Log whether web-hook was successful
- Inbox update shouldn't need channel params
2021-10-28 15:26:20 +05:30
Sojan Jose
8daf1fe033 chore: Add down gem for Local file downloads (#2765)
- Add down gem to handle downloading files to host machine
- Remove the LocalResource class
- Introduce max limit for contact avatars send via SDK
2021-08-11 16:40:28 +05:30
Sojan Jose
ab54d9c629 chore: Upgrade rails and ruby versions (#2400)
ruby version: 3.0.2
rails version: 6.1.4
2021-08-03 20:11:52 +05:30
Sojan Jose
c8b81b066b chore: Add timeouts to requests (#2024) 2021-03-31 16:39:57 +05:30
Sojan Jose
59bee66e63 chore: Handle exceptions on external URL calls (#1334) 2020-10-11 20:22:21 +05:30
Sojan Jose
74d07c876e chore: Fix RestClient::GatewayTimeout, label_list of NilClass (#1243) 2020-09-18 18:50:53 +05:30
Sojan Jose
2193de9853 chore: General fixes and clean up (#1169) 2020-08-25 23:04:02 +05:30
Sojan Jose
8079bf50a0 Feature: API Channel (#1052) 2020-07-21 12:15:24 +05:30
Sojan Jose
52d28105e4 Chore: Remove dead code related to billing (#935)
- remove subscription model
- remove billing-related code
2020-06-07 20:31:48 +05:30
Subin T P
919261d843 Feature: Webhooks (#489) 2020-02-14 23:19:17 +05:30
Pranav Raj S
272c481464 Feature: Create conversations from Tweets (#470)
* Feature: Add tweets to conversations
2020-02-09 15:47:48 +05:30
Pranav Raj S
7b1fdc5fcd BugFix: Filter duplicate DMs in Twitter Integration (#468)
BugFix: Filter duplicate DMs in Twitter Integration
2020-02-05 18:50:37 +05:30
Pranav Raj S
a9c304f1ef Feature: Twitter DM Integration (#451)
An initial version of twitter integration

Co-authored-by: Sojan Jose <sojan@pepalo.com>
2020-02-03 00:54:00 +05:45
Pranav Raj S
94c6d6db6f 🚨Fix Rubocop lint errors 2019-10-20 14:17:26 +05:30
Akshay Birajdar
a1452d7d89 Sprinkle frozen string literal & Indentation Fix (#150)
* Avoid extra string alocation as join will always return string

* Fix indentation

* Sprinkle frozen string literal true
2019-10-16 12:22:30 +05:30
Pranav Raj Sreepuram
2a34255e0b Initial Commit
Co-authored-by: Subin <subinthattaparambil@gmail.com>
Co-authored-by: Manoj <manojmj92@gmail.com>
Co-authored-by: Nithin <webofnithin@gmail.com>
2019-08-14 15:18:44 +05:30