chatwoot/app/controllers/concerns
Sojan Jose 397b0bcc9d
feat: allow agent bots to toggle typing status (#13705)
Agent bot conversations now feel more natural because AgentBot tokens
can toggle typing status, so end users see a live typing indicator in
the widget while the bot is preparing a reply. This keeps the
interaction responsive and human-like without weakening token
authorization boundaries.

## Closes
- https://github.com/chatwoot/chatwoot/issues/8928
- https://linear.app/chatwoot/issue/CW-5205

## How to test
1. Open the widget and start a conversation as a customer.
2. Connect an AgentBot to the same inbox.
3. Trigger `toggle_typing_status` with the AgentBot token
(`typing_status: on`).
4. Confirm the customer sees the typing indicator in the widget.
5. Trigger `toggle_typing_status` with `typing_status: off` and confirm
the indicator disappears.

## What changed
- Added `toggle_typing_status` to bot-accessible conversation endpoints.
- Restricted bot-accessible endpoint usage to `AgentBot` token owners
only (non-user tokens like `PlatformApp` remain unauthorized).
- Updated typing status flow to preserve AgentBot identity in
dispatch/broadcast paths.
- Added request coverage for AgentBot success and PlatformApp
unauthorized behavior.
- Added Swagger documentation for `POST
/api/v1/accounts/{account_id}/conversations/{conversation_id}/toggle_typing_status`
and regenerated swagger artifacts.
2026-03-05 08:13:52 -08:00
..
.keep Initial Commit 2019-08-14 15:18:44 +05:30
access_token_auth_helper.rb feat: allow agent bots to toggle typing status (#13705) 2026-03-05 08:13:52 -08:00
attachment_concern.rb fix: Validate blob before attaching it to a record (#13115) 2025-12-19 19:02:21 -08:00
auth_helper.rb chore: Upgrade rails and ruby versions (#2400) 2021-08-03 20:11:52 +05:30
domain_helper.rb fix: Locale not correct in root url when accessing help center with custom domain (#9110) 2024-03-19 18:48:59 +05:30
ensure_current_account_helper.rb feat: APIs to assign agents_bots as assignee in conversations (#12836) 2025-11-18 18:20:58 -08:00
google_concern.rb refactor: use state-based authentication (#11690) 2025-06-18 17:39:06 +05:30
hmac_concern.rb feat: API to create HMAC verified conversations (#7209) 2023-05-29 21:57:24 +05:30
instagram_concern.rb feat: Instagram Inbox using Instagram Business Login (#11054) 2025-04-08 10:47:41 +05:30
label_concern.rb feat: API to add label to contacts (#1563) 2021-01-03 20:07:57 +05:30
meta_token_verify_concern.rb feat: Support for Whatsapp Cloud API (#4938) 2022-07-06 21:45:03 +02:00
microsoft_concern.rb refactor: use state-based authentication (#11690) 2025-06-18 17:39:06 +05:30
notion_concern.rb feat: notion OAuth setup (#11765) 2025-06-26 19:16:06 +05:30
request_exception_handler.rb chore: Log errors handled by RequestExceptionHandler (#8013) 2023-09-30 19:46:58 -07:00
switch_locale.rb feat: Agent language settings (#11222) 2025-09-09 14:27:36 +05:30
twitter_concern.rb fix: Twitter inbox creation error (#1783) 2021-02-16 19:35:10 +05:30
website_token_helper.rb chore: Allow super admin to suspend an account (#5174) 2022-08-03 11:40:03 +05:30