Commit Graph

161 Commits

Author SHA1 Message Date
Abhinav Raut 721f7c811c fix: variables not being rendered when there's an fetching default outgoing email template / the outgoing email template is not found. 2025-03-22 18:56:50 +05:30
Abhinav Raut a33e1453a8 fix: set proper error type when user is not found 2025-03-22 18:55:26 +05:30
Abhinav Raut b6ce6975c9 fix: mark schedule notification as processed when agent fetch fails for email notification 2025-03-22 18:55:01 +05:30
Abhinav Raut 0f12b2a3f3 feat: allow searching conversations by contact email address 2025-03-21 23:54:43 +05:30
Abhinav Raut def0bb8e4c fix: limit search results to 30 in conversation messages search query 2025-03-21 23:42:24 +05:30
Abhinav Raut 159cca6866 feat: add email templates to migration 2025-03-21 23:38:53 +05:30
Abhinav Raut 83f553227a migrations for v0.5.0 2025-03-21 23:24:18 +05:30
Abhinav Raut 7e16cc1a74 refactor(notifier): remove dependency on user store, instead accept recipient emails 2025-03-21 23:23:35 +05:30
Abhinav Raut aeef7d4ad7 feat: configurable SLA alerts per SLA. 2025-03-21 23:23:03 +05:30
Abhinav Raut 12f2453f5a fix: dashboard chart query 2025-03-21 19:03:01 +05:30
Abhinav Raut 2742be5619 fix: exclude sent messages from report/dashboard charts to avoid data skew 2025-03-21 19:00:56 +05:30
Abhinav Raut 729faf980c fix: incorrect balance import 2025-03-18 23:18:18 +05:30
Abhinav Raut 756147a2c9 fix: remove deleted / disabled users from auto assigner balancer. 2025-03-16 23:10:18 +05:30
Abhinav Raut f277f76a0a fix: sql for migration 2025-03-14 22:59:27 +05:30
Abhinav Raut 5f1a40acba feat: adds new TLS type, tls skip verify and hello name to migrations and schema 2025-03-14 22:42:59 +05:30
Abhinav Raut d90b9c2be7 feat: add TLS type, skip TLS verify, and hello hostname config options to SMTP notification settings 2025-03-14 22:42:09 +05:30
Abhinav Raut 43184ec2f3 feat: add TLS type option to inbox SMTP and IMAP config and TLS skip verify option.
feat: Adds `scan_inbox_since` config for IMAP to set the `SINCE` parameter for imap search, this will allow to scan only the emails received after the given date / time.
chore: remove autoform, use individual form fields for form field.
2025-03-14 21:53:15 +05:30
Abhinav Raut 2fdcf68a22 chore: set closed_at and resolved_at only once in conversations, on subsequent updates they are not to be updated again and again to the current time
- Remove unncessary websocket update due to this change
2025-03-12 03:21:13 +05:30
Abhinav Raut 09703c1090 migrations for v0.5.0 2025-03-12 02:45:32 +05:30
Abhinav Raut 45541c221a fix: various bugs in SLA calculation
prevents multiple update queries unnecessarily on applied sla table.
clear next sla deadline in conversations properly when there's no deadline to be met.
uses the new status column in the applied sla table to determine if the sla is still active and has to be calculated again.
2025-03-12 02:45:17 +05:30
Abhinav Raut fc0e0a8fff fix: Reopen conversations on all statuses, currently custom statuses were not reopening conversations when a new message was received by the customer.
fix: Set resolved_at timestamp when conversation is marked as closed. As agents might close the conversation without resolving it.
2025-03-12 02:41:51 +05:30
Abhinav Raut 227aa26c35 - fix: Inline images present in email quote replies previously not visible, now show up correctly, the media does not get uploaded again instead the existing media url is replaced with the cid url.
- fix: content id check for attachments, as content id is not globally unqiue.

- fix: send missing websocket updates to the fronend on conversation status update.

- refactor: combine get media by id and uuid into a singlequery
2025-03-12 02:39:39 +05:30
Abhinav Raut 3783cce1be fix(email/imap): Properly extract all HTML parts to handle Apple Mail parsing quirks
Resolved issues where Apple Mail:
- Split HTML content across MIME parts, causing rendering inconsistencies, this fix combines them.
- Apple mails sends file attachments as inline......f......, leading to missing files if no Content-ID was present, this fix will treat all attachments without a Content-ID as attachments and not inline.

- Set imap lookback to 48 hrs.
2025-03-12 00:25:06 +05:30
Abhinav Raut 99e8949be6 fix: update first reply time only when sender is a non system user 2025-03-10 02:58:43 +05:30
Abhinav Raut 1ff7317c4d fix: Auto setting of SLA not working on change of assigned team. 2025-03-09 20:41:48 +05:30
Abhinav Raut 580fb76a39 fix: handle non-existent media deletion gracefully and improve logging 2025-03-09 17:28:25 +05:30
Abhinav Raut 91889423a2 fix: SQL for fetching media not linked to any message. 2025-03-09 17:27:55 +05:30
Abhinav Raut 6fb35b90b3 fix: move apply SLA on team change from handler to conversations pkg as automations will also change assigned team and that should also set the appropriate SLA defined for the team. 2025-03-06 20:47:19 +05:30
Abhinav Raut 9892f9dae7 fix: shuffle users in team balancer to prevent ordering bias on app restart 2025-03-06 20:34:51 +05:30
Abhinav Raut 277586f025 fix: round robin assignment not working due to balancer being reloaded entirely. 2025-03-06 20:19:30 +05:30
Abhinav Raut 772152c40c fix: filter out empty email message ids for setting email references headers.
chore: adds debug logs.
2025-03-06 12:24:18 +05:30
Abhinav Raut 8e15d733ea fix: regression in sso login caused due to attempting in hiding client secret in the API response. Resolves #21 2025-03-05 16:13:13 +05:30
Abhinav Raut d1f08ce035 fix: handle null user last active time when marking agents offline. 2025-03-05 04:24:06 +05:30
Abhinav Raut 8551b65a27 fix: set references header in all outgoing emails, set the last 20 messages.
feat: set conversation reference number in the subject of conversation for better thread matching.
fix: hide CSAT link from conversation last message.
2025-03-05 03:49:22 +05:30
Abhinav Raut 494bc15b0a feat: Enable agents to create conversations from the UI
Before this feature the only way to create a conversation was by adding inbox and sending an email.

Agents first search contacts by email, see a dropdown select an existing contact or fill a new email for new contact.

The backend creates contact if it does not exist, creates a conversation, sends a reply to the conversation.
Optinally assigns conversation to a user / team.

fix: Replies to emails create a new conversation instead of attaching to the previous one.

Was not happening in gmail, as gmail was sending the references headers in all replies and I missed this completely. So when libredesk searches a conversation by references headers it worked!

Instead the right way is to generate the outgoing email message id and saving it in DB. This commit fixes that.

There could be more backup strategies like putting reference number in the subject but that can be explored later.

chore: new role `conversatons:write` that enables the create conversations feature for an agent.

chore: migrations for v0.4.0.
2025-03-05 01:17:42 +05:30
Abhinav Raut 360557c58f fix: remove client_id and client_secret from get-all-oidc query 2025-03-04 22:02:42 +05:30
Abhinav Raut 03c68afc4c fix: max age not working for cookies
Switch from expires to max age for setting cookie expiry
Set default max age to 9 hours
2025-03-02 16:28:26 +05:30
Abhinav Raut 96ef62b509 fix: reduce pagination sizes for conversation and message lists 2025-03-02 03:03:33 +05:30
Abhinav Raut 1b63f03bb1 feat: include recipient details in email templates
With this the admin can simply add
```
Dear {{.Recipient.FirstName}},
```

To the default outgoing template and all outgoing emails will have the receipient name.
2025-03-01 20:04:49 +05:30
Abhinav Raut 26d76c966f feat: allow setting OpenAI API KEY from the UI.
feat: new `ai:manage` permission for the same
Migrations for new role.
2025-03-01 19:40:18 +05:30
Abhinav Raut 1ff335f772 fix: improve welcome email template styling and content
fix: extra large app logo in base template.
refactor: standardize template variables, explicitly pass variables for rendering into template
2025-03-01 19:10:50 +05:30
Abhinav Raut c75c117a4d fix: improve password handling and error reporting during password reset 2025-02-27 01:58:08 +05:30
Abhinav Raut 67e1230485 feat: agent availability status
New columns in users table to store user availability status.

Websocket pings sets the last active at timestamp, once user stops sending pings (on disconnect) after 5 minutes the user availalbility status changes to offline.

Detects auto away by checking for mouse, keyboard events and sets user status to away.

User can also set their status to away manually from the sidebar.

Migrations for v0.3.0

Minor visual fixes.

Bump version in package.json
2025-02-26 04:34:30 +05:30
Abhinav Raut fcbd16f042 feat: implement app update checker and UI notification 2025-02-25 02:49:09 +05:30
Abhinav Raut 425bb4ed04 feat: add database upgrade functionality (adapted from listmonk) 2025-02-25 01:35:27 +05:30
Abhinav Raut 89eb05f337 feat: disallow edits for admin role
- chore: minor layout fixes
- chore: adds doc strings to handlers
2025-02-24 22:07:24 +05:30
Abhinav Raut 17efaf0f2c fix: update password strength requirements and hint for system users 2025-02-24 02:42:27 +05:30
Abhinav Raut 5361bcb24f feat: dockerize libredesk
- feat: new flag for idempotent installation `--idempotent-install`
- feat: new flag to skip yes/no prompt `--yes`
- feat: new flag for upgrades `--upgrade`
- refactor: update doc strings and sample toml file.
- chore: update .gitignore.
2025-02-22 23:33:18 +05:30
Abhinav Raut d2a79d9a10 feat: store last message sender in conversation as this will be used to show the Reply icon in the conversations list.
- Introduces new column `last_message_sender` in conversations table.
- Changes to propogate this new column in websocket updates.
2025-02-21 21:40:57 +05:30
Abhinav Raut 8567baa0e1 chore: remove 'In Progress' and 'Waiting' from default statuses
As an admin can always add custom statuses and expand upon the existing ones, the `In Progress` and `Waiting` statuses are not required.
2025-02-21 20:40:32 +05:30