Commit Graph

56 Commits

Author SHA1 Message Date
Sojan Jose
691ab47b6f chore(voice): minor lint cleanups in PR-changed files
- Remove unused vars in VoiceCall.vue subtext
- Make ActionCable helpers static and adjust callers
2025-08-20 14:02:57 +02:00
Sojan Jose
fb4042c863 refactor(voice): use Twilio-native statuses and remove legacy fallbacks
- Drop FE normalizeStatus and BE STATUS_MAPPING
- Update bubbles/preview and store to use Twilio status values
- DRY ActionCable incoming-call payload builder
- Use server-provided conference_sid for client connect
- VoiceAPI: standardized returns, accept store, simplify disconnects
- Remove legacy/fallback comments introduced in this PR
2025-08-20 13:38:50 +02:00
Sojan Jose
a16e3e0352 chore: commit local changes (voice cleanup, audio notifications) 2025-08-18 13:00:08 +02:00
Sojan Jose
f2afc7bdfc Voice: phone-scoped Twilio endpoints, conference TwiML join; enterprise parity for outbound initiation; signature validation via inbox; settings UI + tokens updated; add Enterprise notes to AGENTS.md 2025-08-15 16:41:42 +02:00
Sojan Jose
af91b4af21 refactor(voice): unify inbound/outbound via orchestrator & message builder
- Add Voice::CallOrchestratorService to centralize flows
- Add Voice::CallMessageBuilder for consistent voice call messages
- Incoming/Outgoing services delegate to orchestrator; use CallStatus::Manager
- ConversationFinderService: phone optional; public call_sid lookup

feat(ui): simplify call widget + reliable incoming detection + ringtone

- Remove global widget toggling; rely on Vuex
- ActionCable: loosen created condition, backfill on updated
- Add ringtone on incoming via shared Audio helper
- Guard Twilio connect() to avoid duplicate active call errors

fix(voice): decline incoming ends call & updates status

- Reject call now completes Twilio call if in progress
- Update status via manager to no_answer with activity
2025-08-14 16:50:38 +02:00
Sojan Jose
9ce6d9076b chore: apply code quality improvements and linting fixes
- Remove remaining console.log statements and replace with comments
- Add ESLint disable comments for intentionally unused variables
- Improve code formatting and style consistency
- Fix remaining linting violations for better CI compliance
2025-08-13 13:53:56 +02:00
Sojan Jose
669241801e chore: clean up 2025-07-17 04:53:37 -07:00
Sojan Jose
cb9d45a355 chore: clean up voice channel code for MVP
- Simplify message builder content_attributes handling
- Remove AI captain integration from incoming call service
- Clean up FloatingCallWidget by removing non-essential features:
  - Remove Gravatar/MD5 dependency
  - Remove keypad/DTMF functionality
  - Remove fullscreen toggle
  - Simplify avatar handling
- Apply consistent code formatting across voice components
- Remove debug logging and unused code

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 02:22:07 -07:00
Sojan Jose
6c998ef4cf feat: Remove non-essential voice features
- Remove recording controller (recordings not needed for basic calls)
- Remove complex CallManager component (FloatingCallWidget handles core functionality)
- Remove advanced DashboardAudioNotificationHelper (simple audio handled in components)
- Clean up all references to removed audio helper
- Keep essential components for core voice calling functionality
2025-07-13 16:48:04 -07:00
Sojan
759fe0d3f6 Merge develop into feat/voice-channel
Resolved merge conflicts in:
- MessagesView.vue: Combined VoiceTimelineView component from voice channel feature with component list updates from develop
- actionCable.js: Merged call event handlers (incoming_call, call_status_changed) with copilot message event handler from develop
- message.rb: Combined voice call helper methods with send_update_event method from develop

All conflicts resolved while preserving functionality from both branches.
2025-06-20 00:02:50 -07:00
Pranav
f42fddd38e feat: Add stores for copilotMessages and copilotThreads (#11603)
- Set up stores for copilotThreads and copilotMessages.
- Add support for upsert messages to the copilotMessages store on
receiving ActionCable events.
- Implement support for the upsert option.
2025-05-27 18:36:32 -06:00
Sojan Jose
ce6489b485 Merge branch 'develop' into feat/voice-channel 2025-05-27 16:49:02 -07:00
Sivin Varghese
e92f72b318 chore: Prevent online presence during impersonation (#11538) 2025-05-23 09:53:40 +05:30
Sojan
aa4ef28e0e chore: fixes 2025-05-09 20:47:03 -07:00
Sojan
2879a0cd42 chore: new floating widget design 2025-05-08 03:42:47 -07:00
Sojan
4e8a39f358 chore: fix conversation list status 2025-05-04 18:07:16 -07:00
Sojan
4c48a565f6 chore: code cleanup 2025-05-03 02:09:34 -07:00
Sojan
3692cde1a9 chore: inbound and outbound calls that work 2025-05-02 02:41:38 -07:00
Sojan
3f0c01e166 chore: floating button for incoming call 2025-04-29 03:45:08 -07:00
Pranav
7469cde0b9 fix: Remove Report API calls from being called on every event (#10691)
Previously, the Reports API fetched data based on event triggers. For
example, when an event occurred on an account, the system would
automatically retrieve and display updated information. However, this
approach was designed under the assumption that reports would be
accessed by a small number of users and on an infrequent basis (e.g.,
once daily or weekly).

In scenarios where large customers have multiple team members actively
monitoring reports, this event-driven approach led to an excessive
number of requests, significantly straining the system.

This PR introduces a interval-based fetching of reports instead of the
event-driven model.
2025-01-15 11:23:00 -08:00
Shivam Mishra
42f6621afb feat: Vite + vue 3 💚 (#10047)
Fixes https://github.com/chatwoot/chatwoot/issues/8436
Fixes https://github.com/chatwoot/chatwoot/issues/9767
Fixes https://github.com/chatwoot/chatwoot/issues/10156
Fixes https://github.com/chatwoot/chatwoot/issues/6031
Fixes https://github.com/chatwoot/chatwoot/issues/5696
Fixes https://github.com/chatwoot/chatwoot/issues/9250
Fixes https://github.com/chatwoot/chatwoot/issues/9762

---------

Co-authored-by: Pranav <pranavrajs@gmail.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2024-10-02 00:36:30 -07:00
Sivin Varghese
af90f21cfd feat: Reconnect logic (#9453)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
2024-06-03 15:54:19 +05:30
Fayaz Ahmed
b474929f5e chore: Replace eventBus with mitt.js [CW-3275] (#9539)
# Replace the deprecated `eventBus` with mitt.js

## Description

Since eventBus and it's respective methods are deprecated and removed
from all future releases of vue, this was blocking us from migrating.
This PR replaces eventBus with
[mitt](https://github.com/developit/mitt). I have created a wrapper
mitt.js to simulate the same old event names so it's backwards
compatible, without making a lot of changes.


Fixes # (issue)

## Type of change

Please delete options that are not relevant.

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality not to work as expected)
- [ ] This change requires a documentation update

## How Has This Been Tested?

1. Made sure all the places we're listening to bus events are working as
expected.
2. Respective specsf or the events from mitt.


## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented on my code, particularly in hard-to-understand
areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream
modules
2024-05-31 15:50:36 +05:30
Muhsin Keloth
1b21e0d429 feat: Add notification.updated event (#8871) 2024-02-07 18:15:51 +05:30
Muhsin Keloth
bf49a17efa feat: Handle notification.deleted action cable event (#8501) 2023-12-06 16:49:00 +05:30
Shivam Mishra
a88d155dd7 feat: update tool-chain to latest (#7975)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2023-09-27 14:02:34 +05:30
Muhsin Keloth
59433d9d3c feat: Adds the ability to sort conversations (#6853)
* Add sort filter

* Change UI

* Change filter

* Complete sort by filters

* Style fixes

* Fix default sort

* Update app/javascript/dashboard/components/widgets/conversation/ConversationBasicFilter.vue

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>

* Update app/javascript/dashboard/components/widgets/conversation/ConversationBasicFilter.vue

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>

* Update app/javascript/dashboard/components/ChatList.vue

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>

* Added translation

* Added review fixes

* Add more updates

* Code cleanups

* Update last_activity_at on message received event

* Cleans up the design for chatlist and icons

* Fix sort

* Remove inline styles

* Add tag along with the title

---------

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2023-05-05 17:08:32 -07:00
Muhsin Keloth
815322b27a feat: Refetch the active conversation messages on action cable reconnect (#6790) 2023-04-24 10:17:12 +05:30
Shivam Mishra
00ee0478eb feat: IndexedDB based caching for labels, inboxes and teams [CW-50] (#6710)
* feat: allow caching of labels in the account scope

* feat: send cache keys in account json response

* feat: kickstart web worker

* feat: setup basic architecture for workers

* feat: install idb

* feat: add datamanger

* fix: typos

* refactor: rename method

* feat: make init db a manual step

* refactor: separate accountIdFromRoute

* feat: cache enabled API client

* feat: enable caching for inboxes and labels

* feat: enable cache for team

* feat: manage exceptions for team

* feat: add team to data manager

* feat: add a generic listener

* refactor: send only cache keys

* refactor: separate validate method

* feat: add listeners

* feat: add event for revalidate

* feat: add cache keys endpoint

* refactor: fetch cache keys instead of full account data

* fix: key pattern

* feat: don't fetch account for cache_keys

* fix: cache key base class

* refactor: cache keys helper

* feat: add helper

* fix: cache-key update logic

* feat: delete indexeddb on logout

* feat: remove worker.js

* refactor: move data-manager

* refactor: name of file

* feat: add test for DataManager

* refactor: add fake idb to jest setup

* test: cache keys helper

* test: cache keys helper

* test: cache_keys in accounts controller

* refactor: remove cache_keys context

* feat: add policy for cache-keys
2023-03-27 12:16:25 +05:30
Pranav Raj S
6ffb7fe34e chore: Refactor audio notification helper (#6148) 2022-12-30 13:54:37 -08:00
Muhsin Keloth
92724576af fix: Update conversation read status indicator logic (#5777) 2022-10-31 09:35:48 -07:00
DanielGannage
a3277b45af feat: Update conversation attributes in realtime when they changed (#5542)
Co-authored-by: daniel gannage <daniel@pxdel.com>
Co-authored-by: Tejaswini Chile <tejaswini@chatwoot.com>
2022-10-19 17:26:10 -07:00
Aswin Dev P.S
676796ddc7 feat: Add reports about live agent load (#4537)
* feat: Add reports about live agent load
2022-04-25 07:34:41 -07:00
Fayaz Ahmed
2b2252b66e feat: Add a read indicator for web-widget channel (#4224)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-04-20 16:03:12 +05:30
Pranav Raj S
0319b78eac fix: Allow users to login even if they have access to more than 15 accounts (#4475) 2022-04-14 20:54:26 +05:30
Muhsin Keloth
ccf52a620b feat: Update notifications and unread count in real time (#4261) 2022-03-28 20:01:23 +05:30
Pranav Raj S
2be71e73dc feat: Add a view for mentions (#3505)
- Added a new table mentions for saving user mentions
- Added a filter conversation_type in the API
- Added a view to see the mentions
2021-12-09 11:20:14 +05:30
Muhsin Keloth
a2764e5c1d chore: Update deleteCustomAttribute method in SDK (#3334) 2021-11-15 14:56:35 +05:30
Sojan Jose
cebd34053b chore: Use availability in dashboard presence toggle (#3212) 2021-10-15 00:30:48 +05:30
Aswin Dev P.S
4f51a46c2b feat: Ability to delete a contact (#2984)
This change allows the administrator user to delete a contact and its related data like conversations, contact inboxes, and reports.

Fixes #1929
2021-09-23 12:52:49 +05:30
Pranav Raj S
25ba852b68 chore: Adjust Chatwoot Config to deploy frontend as a separate app (#2347) 2021-05-28 19:21:16 +05:30
Sojan Jose
4b49d21543 chore: Add event for conversations transferred to Bot (#2167)
* chore:  Event for conversation transferred to Bot

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Nithin David <webofnithin@gmail.com>
2021-04-28 20:53:23 +05:30
Nithin David Thomas
43b5a435ec Fix: Add check for id on update conversation (#1966) 2021-03-22 20:24:51 +05:30
Nithin David Thomas
6afa1fb556 Fix: Error when assigns a conversation to user (#1926) 2021-03-19 12:55:05 +05:30
Nithin David Thomas
9e8a943ec7 feat: Add audio alert for incoming messages on dashboard (#1738)
Fixes: #1345
2021-03-04 19:24:03 +05:30
Sojan Jose
4216d63311 feat: Ability to reply to specific tweets (#1117)
Ability to choose a specific tweet to reply to

Fixes #982
Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
2020-08-11 09:57:42 +05:30
Sojan Jose
43147b3163 Chore: Fix presence for current user (#1001)
Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
2020-07-04 20:03:16 +05:30
Sojan Jose
c98907db49 Feature: Availability Statuses (#874)
Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
2020-07-04 11:42:47 +05:30
Pranav Raj S
40481f6462 Bugfix: Update conversation counters in realtime (#944)
* Bug: Update conversation counters in realtime
2020-06-09 16:26:33 +05:30
Pranav Raj S
f78df91dd2 Chore: Contact Sidebar, conversation cleanup (#908)
- Update sidebar design
- Move every contact data to contacts module
- Revert go to next conversation feature
- Fix issues with new conversation in action cable
- Escape HTML content
- Broadcast event when conversation.contact changes.

Co-authored-by: Sojan <sojan@pepalo.com>
2020-06-02 22:59:02 +05:30