Commit Graph

2824 Commits

Author SHA1 Message Date
Sojan Jose
73e10090b9 Merge branch 'develop' into feat/voice-channel 2025-08-21 18:34:45 +02:00
Sojan Jose
714f24de11 revert: "fix(sdk): Ignore messages from a different origin and sanitizee URLs (#8879)" (#12248)
This reverts commit a42b99ada0.

fixes: #12247
2025-08-20 21:39:50 +02:00
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
984f6c3f14 chore(voice): Remove redundant comment in components-next VoiceCallButton 2025-08-19 17:02:04 +02:00
Sojan Jose
fce3bee74f chore(voice): Remove route-level VoiceCallButton shim; use components-next import directly 2025-08-19 16:56:20 +02:00
Sojan Jose
9926131cd8 chore(voice): Add shim component at old route path to prevent ENOENT during dev; re-export components-next/Contacts/VoiceCallButton 2025-08-19 16:47:03 +02:00
Sojan Jose
fdc3890838 chore(voice): Consolidate to components-next VoiceCallButton with actual call; remove route-level component; wire ContactInfo and ContactsDetailsLayout; add inbox picker i18n 2025-08-19 16:40:33 +02:00
Sojan Jose
83a195d863 refactor(voice): Restore VoiceCallButton and migrate call logic from ContactCallButton; remove ContactCallButton references and align behavior to develop; update i18n accordingly 2025-08-19 16:22:21 +02:00
Sojan Jose
2b87e9f9f8 voice: wire Call button to initiate calls in voice branch\n\n- Resolve merge to prefer ContactCallButton (wired to VoiceAPI)\n- Use ContactCallButton in Contacts details header and contact panel\n- Remove placeholder VoiceCallButton and redundant i18n keys 2025-08-19 13:37:40 +02:00
Sojan Jose
7fe94dc1a2 feat(voice): Call button on Contacts with inbox picker (#12218)
## Description
This introduces a reusable Call button used in the Contacts details
header (between Block contact and Send message) and
in the conversation contact panel. The button shows only when the
account has at least one Voice inbox and the contact
has a phone number. If multiple Voice inboxes are present, clicking
opens a picker modal; otherwise, a “Calling is under
development” toast is shown

> Actual wiring to functionality will available in follow up PRs

references: #11602 , #11481 

## Screens 

<img width="250" alt="Screenshot 2025-08-18 at 8 33 02 PM"
src="https://github.com/user-attachments/assets/d7a09a9d-8eff-4461-a75f-27854540c2a0"
/>
<img width="250" alt="Screenshot 2025-08-18 at 8 32 31 PM"
src="https://github.com/user-attachments/assets/682ae66e-dd5f-4750-9c30-0a210e120250"
/>
<img width="250" alt="Screenshot 2025-08-18 at 8 32 40 PM"
src="https://github.com/user-attachments/assets/7de0d753-eefc-4b7f-942b-ecca1964fcd7"
/>


## Test Cases

- Enable voice feature and create inboxes and test the cases for both
contact details view and contact card view in conversation
  - Details: 0 Voice inboxes → no Call button.
- Details: 1+ Voice inboxes, no phone number for contact → no Call
button.
- Details: 1 Voice inbox + phone number for contact → button visible;
click → toast.
- Details: >1 Voice inboxes + phone number for contact → click → modal →
choose → toast.

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2025-08-19 15:42:01 +05:30
Chatwoot Bot
cae097c5fa chore: Update translations (#12208) 2025-08-19 12:27:13 +05:30
Sivin Varghese
faf35738b3 fix: Prevent reopening a resolved conversation (#11168)
# Pull Request Template

## Description

This PR addresses the issue where navigating back and starting a new
conversation incorrectly shows the previous messages or message screen.

Fixes
https://linear.app/chatwoot/issue/CW-4169/prevent-continue-conversation-in-previously-resolved-conversation

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)

## How Has This Been Tested?

### Loom video
**Before**

https://www.loom.com/share/18172a3b26ff4e8faf8e1c3c1a0ba279?sid=ffbda52a-93e1-400f-bedc-17b925bae4d3

**After**

https://www.loom.com/share/584177d411424ad38c6812be868eb060?sid=fe5e771a-3faa-4c14-a5fe-918a3ccdb408

## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [ ] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] 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
- [ ] Any dependent changes have been merged and published in downstream
modules

---------

Co-authored-by: Pranav <pranav@chatwoot.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2025-08-19 12:06:22 +05:30
Sojan Jose
5ab261398b Merge branch 'develop' into feat/voice-channel 2025-08-18 19:51:32 +02:00
Sojan Jose
a2b5cf57e4 chore(voice): keep minimal diffs; remove setMute and stray route; retain MessageBuilder EE hook 2025-08-18 18:29:06 +02:00
Muhsin Keloth
67d7ee0185 feat: Add full change log to profile (#12215)
**Preview**
<img width="400" height="600" alt="CleanShot 2025-08-18 at 19 48 37@2x"
src="https://github.com/user-attachments/assets/28983793-adf4-4145-bb80-573e21cf5a0d"
/>
2025-08-18 21:40:13 +05:30
Sojan Jose
8bb473e5e1 chore(voice): trim non-functional changes and enforce webhook-driven status
- OSS: keep ContactInboxBuilder unchanged; use EE prepend
- ReplyBox: restrict all Voice conversations to private notes
- Restore audio alerts helper plumbing; avoid unrelated refactor
- Revert URLHelper/Icon trivial defensive edits
- Remove unused button slot in contact info row
- EE Voice controllers: use shared RequestExceptionHandler; remove manual status writes
- Twilio status endpoint: handle conference + call statuses; remove comments
- Orchestrator: remove status comments to reduce noise
2025-08-18 17:01:05 +02:00
Sojan Jose
9a41017aa3 feat(voice): add Call action on contact details with modal picker
- Add ContactCallButton component; icon variant for sidebar, text variant for details header
- Place Call between Block and Send Message on contact details header
- Use modal to select Voice inbox when multiple numbers exist
- Allow optional inbox_id on contact call API and service
- Revert Compose New Conversation voice changes to reduce scope
- Add missing i18n strings (CALL_CONTACT, SELECT_NUMBER)
2025-08-18 16:11:20 +02:00
Sojan Jose
72296d6053 Merge branch 'develop' into feat/voice-channel 2025-08-18 15:15:16 +02:00
Sojan Jose
b1210e89c5 feat(voice): move backend to enterprise and fix call status sync
- Gate voice routes behind enterprise flag
- Move voice controllers/services to enterprise overlay
- EE overrides: ContactInboxBuilder, MessageBuilder, ContactableInboxesService, Conversation, Presenter
- Twilio flow: robust end handling, terminal guards, always broadcast updates
- UI: conversation list preview falls back to message status; normalized icons and statuses
- Ensure Voice inbox appears in contactable inboxes
2025-08-18 15:13:05 +02:00
Sojan Jose
a16e3e0352 chore: commit local changes (voice cleanup, audio notifications) 2025-08-18 13:00:08 +02:00
Sivin Varghese
02fa76f3df chore: Update contact empty state data (#12207)
# Pull Request Template

## Description

Fixes
https://linear.app/chatwoot/issue/CW-5432/use-a-different-company-nameemail-for-the-empty-state-in-contacts


## How Has This Been Tested?

### Screenshot
<img width="1044" height="555" alt="image"
src="https://github.com/user-attachments/assets/a414f88f-13ca-4c1e-bb76-cd5b9217d21f"
/>


## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [ ] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] 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
- [ ] Any dependent changes have been merged and published in downstream
modules
2025-08-18 12:06:03 +05:30
Sojan Jose
6c6a2ec58f Voice: refactor tokens to service; unify token endpoint; enforce Twilio signature validation; remove legacy tokens controller; keep phone-scoped routes in accounts and enterprise 2025-08-16 12:43:22 +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
3412f1dc8f Merge branch 'develop' into feat/voice-channel 2025-08-14 16:51:47 +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
c0b201f169 fix: improve call termination and auto-join for voice calls
- Fix outgoing call auto-join without manual button click
- Fix end call button to properly terminate calls on contact side
- Fix decline button to immediately disconnect customer calls
- Improve call state detection for outgoing vs incoming calls
- Add proper WebRTC disconnect handling when contact hangs up
- Enhanced error handling and state cleanup for all call scenarios
2025-08-14 15:53:09 +02:00
Sivin Varghese
91d80004a6 chore: Improvements in scenarios (#12098)
Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-14 19:07:28 +05:30
Sivin Varghese
b809cd2f15 chore: Optimize contact page for smaller displays (#12183)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2025-08-14 19:07:20 +05:30
Chatwoot Bot
ee773f31eb chore: Update translations (#12167)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2025-08-14 15:30:00 +05:30
Shivam Mishra
a42b99ada0 fix(sdk): Ignore messages from a different origin and sanitize URLs (#8879)
This PR includes some specific security related fixes

1. Validate the origin of any message events
2. Sanitize URLs before opening them

---------

Co-authored-by: Pranav <pranav@chatwoot.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2025-08-14 14:33:32 +05:30
Pranav
14471cc20c chore: Add bulgarian (bg) language (#12189)
Add bg to supported langauges
2025-08-13 10:23:25 -07:00
Sojan Jose
e535bc37e1 chore: apply simplified voice channel components from stash
- Simplify voice.js API from 960+ to 133 lines with clean architecture
- Convert VoiceCall.vue to Composition API with script setup
- Remove complex diagnostics and use essential functionality only
- Fix initiateCall endpoint URL for outgoing calls
- Maintain original green colors for call status indicators
2025-08-13 16:34:40 +02:00
Sojan Jose
cd643ef9d5 Merge branch 'develop' into feat/voice-channel 2025-08-13 13:55:46 +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
36d18c50e4 fix: resolve JavaScript errors and linting issues after merge
- Remove malformed console.log statements from voice.js API
- Fix variable shadowing in calls.js store module
- Clean up code formatting and add missing newline in MessagePreview.vue
- Resolve syntax errors that prevented application from loading
2025-08-13 13:47:44 +02:00
Clairton Rodrigo Heinzen
b711bfd2ca feat: Add automation rule event conversation resolved (#9669)
# Description

add automation rule event conversation resolved

<img width="1552" alt="Captura de Tela 2024-06-22 às 21 25 39"
src="https://github.com/chatwoot/chatwoot/assets/471685/b3a64ebc-35c8-468c-a0e5-7974134a40f9">

---------

Co-authored-by: Sojan <sojan@pepalo.com>
Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2025-08-13 12:57:14 +05:30
Sivin Varghese
42af4b1d01 fix: Reset inbox on conversation switch in compose conversation modal (#12174) 2025-08-13 12:42:57 +05:30
Sojan Jose
d29dfa704f Merge branch 'develop' into feat/voice-channel 2025-08-12 17:00:25 +02:00
Sivin Varghese
0c101b1f6b chore: UI improvements to compose new conversation form (#12173) 2025-08-12 20:21:05 +05:30
Sojan Jose
5592752f9b Merge develop into feat/voice-channel
- Resolved conflicts in InboxName.vue (kept develop's ChannelIcon approach)
- Resolved conflicts in ConversationCard.vue (merged both :conversation prop and flex classes)
- Resolved conflicts in ContactInfo.vue (kept both inboxMixin and Avatar imports)
- Resolved conflicts in en.yml (merged voice channel translations with reauthorization config)
2025-08-12 16:46:48 +02:00
Muhsin Keloth
5c560c7628 feat: WhatsApp enhanced templates front end changes (#12117)
Part of the https://github.com/chatwoot/chatwoot/pull/11997

Co-authored-by: Sojan Jose <sojan@pepalo.com>
Co-authored-by: iamsivin <iamsivin@gmail.com>
2025-08-12 18:53:19 +05:30
Shivam Mishra
b4f758f644 fix: grid layout for color picker (#12166) 2025-08-12 12:05:17 +05:30
Chatwoot Bot
693309202e chore: Update translations (#12148) 2025-08-12 07:10:11 +05:30
Sivin Varghese
ecd9cf0326 fix: RTL issues in new conversation form (#12163)
# Pull Request Template

## Description

This PR fixes RTL alignment issues in the new conversation form, removes
the unused
[`form-checkbox`](https://github.com/chatwoot/chatwoot/pull/12151#discussion_r2266333315)
class name and drops the `app-rtl--wrapper` class, which was previously
used for RTL detection in `rtl.scss` (removed earlier)

Fixes https://linear.app/chatwoot/issue/CW-5410/rtl-issues

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)

## How Has This Been Tested?

### Screenshots

<img width="868" height="474" alt="image"
src="https://github.com/user-attachments/assets/45995652-2895-49d5-a651-179090c949ec"
/>
<img width="868" height="656" alt="image"
src="https://github.com/user-attachments/assets/a1cb4415-3fd4-4c9a-bc46-5e07e437d757"
/>
<img width="868" height="656" alt="image"
src="https://github.com/user-attachments/assets/77c8981f-364e-4bf0-bea8-a4c42a76d065"
/>



## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [ ] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] 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
- [ ] Any dependent changes have been merged and published in downstream
modules
2025-08-11 14:16:48 -07:00
Sivin Varghese
1baf5cbe19 chore: Replace tooltip in Avatar component with title attribute (#12152) 2025-08-11 17:58:07 +05:30
Shivam Mishra
c2e6ad6376 feat: add citations option to edit assistant form (#12151)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2025-08-11 17:04:03 +05:30
Sivin Varghese
d908c880d2 chore: Replace Thumbnail with Avatar (#12119) 2025-08-11 15:47:17 +05:30
Shivam Mishra
fcc6e2b8b2 feat: Add feature_citation toggle for Captain assistants (#12052)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2025-08-11 13:06:20 +05:30
Chatwoot Bot
f3bc2476fc chore: Update translations (#12073)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2025-08-11 12:29:22 +05:30