Commit Graph

102 Commits

Author SHA1 Message Date
Abhinav Raut 6abb6ad017 Move continuity config and intervals to live chat inbox form from toml.
- Refactor widget.js.
- Fix possible race conditions in inbox reload logic.
- Reload only the updated inbox when an inbox is updated / created not all.
- Retain last inbox while navigatin back from admin -> inbox
2026-04-04 21:35:04 +05:30
Abhinav Raut 000fd83b30 Add uuid column to inboxes table to use as widget public identifiers
Auto focus on form inputs in widget
Use defer widget in widget installation script
2026-04-03 02:34:07 +05:30
Abhinav Raut fb3ab68ef6 Sign avatar URLs in widget WS broadcasts, add CORS for launcher settings 2026-03-29 19:08:09 +05:30
Abhinav Raut b4b4c809d4 Fix Reply-To double-set: caller-provided takes priority over inbox-level plus-addressing 2026-03-28 23:53:56 +05:30
Abhinav Raut 8a1ac870d0 Fix race condition in livechat Send: hold RLock during client iteration 2026-03-28 21:30:07 +05:30
Abhinav Raut 2b645fa4e8 Security fixes: rate-limit widget endpoints, remove JWT from logs, harden middleware checks
Increase max page size to 500
Allow large out of bound page sizes by overriding to maximum set.
Reset websocket reconnect attempts when widget is back online
2026-03-28 19:27:41 +05:30
Abhinav Raut 395a4e80df Refactor ws updates to use direct json payloads instead of prop value pattern.
Add real-time agent availability status updates to widget.

Consolidate multiple WS broadcasts into single calls
2026-03-22 19:34:21 +05:30
Abhinav Raut 34aecd268f Fix widget business hours: use assigned team hours instead of always defaulting, fix timezone offset calculation. Show continuity email indicator in agent UI, broadcast email replies to widget as a user could have widget open and reply from email at the same time. 2026-03-18 10:50:55 +05:30
Abhinav Raut a788553137 Use first unread message as subject for continuity emails, add ref number to continuity email subject.
- Continuity email layout fixes and improvments.
- Replace haikunator with email local part for visitor names, fallback to "Visitor"
- Add optional website_url config field for "go to chat" link in continuity email footer
- Remove unused / unncessary i18n keys.
2026-03-16 00:49:20 +05:30
Abhinav Raut eb0a7b437d Add page visit tracking to widget
- fix duplicate initialization guard
- notification bell for agents
- Refactor and clean up dead code
- Fixes to pre chat form
- Add new column country to users table
- Update ratelimit pkg to be generic
2026-03-11 03:52:07 +05:30
Abhinav Raut 0b7c816407 Allow live chat widgets to detect lang from user browser and fallback to defaults set by admin.
New handler to return all available langs, remove hardcoded langs
2026-02-26 01:54:34 +05:30
Abhinav Raut 81847c7f4e i18n: fix localization issues (#231)
Not backported to main due to extensive i18n refactoring changes in this branch.
2026-02-22 15:12:00 +05:30
Abhinav Raut 7b7629d6fa Merge branch 'main' into feat/live-chat-channel 2026-02-11 00:27:59 +05:30
Abhinav Raut d0bad37464 feat: add support for toggling plus addressing for email inbox.
Fixes #233
2026-01-29 00:00:49 +05:30
Abhinav Raut a94c3846ec more fixes 2026-01-25 01:31:04 +05:30
Abhinav Raut f0e9266d28 more fixes to LC 2026-01-21 00:13:02 +05:30
Abhinav Raut 107f1adb0d fix issues with threading with widget messages
- fix: live chat email inbox not being initialized.
- make launcher logo take entire launcher space.
- New columns last_interaction_sender_id and last_message_sender_id to track who sent last message in conversation
2026-01-18 13:47:07 +05:30
Abhinav Raut e2a9a00217 Live chat: add admin toggle to open widget directly into previous conversation / a new conversation
- Improve greeting and introduction messages to support template variables for user names.
2026-01-17 18:22:40 +05:30
Abhinav Raut 08acb099a1 fix build 2026-01-14 16:09:22 +05:30
Abhinav Raut 7958d7e212 Merge branch 'main' into feat/live-chat-channel 2026-01-14 00:33:51 +05:30
Abhinav Raut b7d5ee0952 fix: add prompt=consent for Google to make sure we get refresh token everytime 2025-12-31 03:02:23 +05:30
Abhinav Raut 0c766323a1 update authorization URL to prompt for account selection 2025-12-29 01:34:57 +05:30
Abhinav Raut 27d929c302 refactor add util funcs to extract conversation uuid from to address 2025-12-26 03:15:07 +05:30
Abhinav Raut 096bc87016 Feat: add plus-addressing for conversation matching on incoming emails 2025-12-24 16:08:25 +05:30
Abhinav Raut 22af66c44d Feat: match incoming messages to conversations using reference number in the subject.
refactor: update GetConversation method to include reference number parameter
2025-12-24 16:08:25 +05:30
Abhinav Raut e4f260e3f4 fixes for msft email provider 2025-12-24 16:08:25 +05:30
Abhinav Raut b7103b24ef show oauth callback error / success messages as toast.
Add logs for errors and minor refactor
2025-12-24 16:08:25 +05:30
Abhinav Raut c7f1f23c0b fix deadlock on token refresh 2025-12-24 16:08:25 +05:30
Abhinav Raut 44554118f2 fix do dot encrypt client id
remove superfluous arg
set default imap scan interval to 5 mins
2025-12-24 16:08:25 +05:30
Abhinav Raut 0a70204731 refactor and clean up remove uncessary token refresh on init of email inbox 2025-12-24 16:08:25 +05:30
Abhinav Raut 2a238a719e -fix email notifications not working.
- reload app settings when notification settings are changed to trigger admin banner prompting user to restart app
- remove unncessary dummy password check before retaining passwords as an empty password check is enough.
2025-12-24 16:08:25 +05:30
Abhinav Raut 4de936da22 remove omitempty from tags
remove unused fn
2025-12-24 16:08:25 +05:30
Abhinav Raut 5c364fb954 fix oauth credentials not being saved correctly , refactor use exisitng oauth pkg for oauth functionalities 2025-12-24 16:08:25 +05:30
Abhinav Raut f3ddc26512 wip inbox oauth and encryption 2025-12-24 16:08:25 +05:30
vldmkr 532ae1f7d1 feat(imap): enhance searchMessages to fallback to standard SEARCH on ESEARCH failure 2025-12-08 14:14:49 +02:00
Abhinav Raut d4420cff7d feat(imap): add fallback for servers without ESEARCH support
Check ESEARCH capability before using extended search options. For
servers that don't support ESEARCH, fall back to using sequence
numbers from AllSeqNums() instead of Min/Max range.

Ref #181
2025-12-01 01:34:07 +05:30
Abhinav Raut aae8d1f793 Consider visitors and contacts same, as the only difference is that visitors are not authenticated.
Show a warning in sidebar when a conversation with a visitor is opened.

Move string.js utils to shared-ui utils

Modify user fetch queries to allow optional filter by multiple user types not just one.

Fix capitalizaiton for live chat en translations
2025-10-05 12:28:47 +05:30
Abhinav Raut bf1cf025e0 Merge branch 'main' into feat/live-chat-channel 2025-10-04 13:38:42 +05:30
Abhinav Raut 16ca6b6df7 Send batched unread messages in conversation continuity email after contact has not seen a conversation for configured amount of time, instead of sending a single message immediately when contact is disconnected on websocket.
Make the batching interval and time threshold for unread messages configurable
2025-10-03 01:54:17 +05:30
Abhinav Raut 54e614422d refactor and fixes to convo continuity 2025-09-25 02:49:23 +05:30
Abhinav Raut 3a5990174b fixes to pre chat form 2025-09-25 02:20:00 +05:30
Abhinav Raut 5de870c446 Config option to show or hide ‘Powered by Libredesk’ in the live chat widget.
Make the start conversation button a floating button and add a gradient fade overlay
2025-09-24 23:34:39 +05:30
Abhinav Raut d7067bce7d feat: add email fallback / continutiy inbox feature for live chat inbox 2025-09-21 00:51:19 +05:30
Abhinav Raut 634fc66e9f Translate welcome to libredesk email subject
- Update all SQL queries to add missing columns

- Update the create conversation API to allow setting the initiator of a conversation. For example, we might want to use this API to create a conversation on behalf of a customer, with the first message coming from the customer instead of the agent. This param allows this.

- Minor refactors and clean up

- Tidy go.mod

- Rename structs to reflect purpose

- Create focus structs for scanning JSON payloads for clarity.
2025-08-28 00:34:56 +05:30
Abhinav Raut 68c2708464 feat: remove VisitorInfoForm component and integrate customizable pre-chat form.
- Deleted the VisitorInfoForm.vue component and its associated schema.
- Introduced a new preChatFormSchema.js to handle dynamic form validation.
- Updated ChatView.vue to conditionally display the PreChatForm based on user session and conversation state.
- Enhanced chat store to manage current conversation updates.
- Implemented WebSocket event handling for conversation updates.
- Updated localization files to include new terms related to the pre-chat form.
- Modified conversation management logic to support broadcasting updates to widget clients.
- Updated SQL queries to accommodate custom attributes for visitors.
2025-08-22 00:42:12 +05:30
Abhinav Raut 550a3fa801 fix: update Message-ID determination logic to prefer IMAP-parsed IDs over raw headers 2025-08-20 04:26:23 +05:30
Abhinav Raut 6bbfbe8cf6 add test cases for imap msg id parsing 2025-08-20 04:18:37 +05:30
Abhinav Raut f9ed326d72 fix: handle message empty message ids in imap 2025-08-20 03:29:16 +05:30
Abhinav Raut c35ab42b47 feat: configurable visitor information collection with a form before starting chat.
fix: Chat initialization failing due to the JWT authenticated user doesn't exist in the DB yet.

fix: Always upsert custom attribues instead of replacing.
2025-07-21 01:58:30 +05:30
Abhinav Raut 4beab72a11 feat: add external user ID support and secret field for inboxes.
Update user and inbox models, queries, and migrations
2025-07-20 16:42:03 +05:30