Commit Graph

253 Commits

Author SHA1 Message Date
Abhinav Raut 03b932c1c0 fix: handle empty inbox email address in fetchAndProcessMessages 2025-06-08 12:17:58 +05:30
Abhinav Raut 012de059e7 fix: remove conflicting constraints on NOT NULL columns in applied_slas and csat_responses tables, update constraints for csat_responses and applied_slas tables to cascade deletes instead 2025-06-08 11:50:22 +05:30
Abhinav Raut 53d5715429 fix: implement loop prevention header in emails
#Ref 90
2025-06-08 02:22:36 +05:30
Abhinav Raut e567acbe59 fix(sql): overview report for days = 0 i.e. todays data 2025-06-08 01:24:01 +05:30
Abhinav Raut 57d0e90b5f refactors(i18n-keys): use correct keys in vue and go errors
- fix: invalidate agent cache on update / create
2025-06-08 00:59:15 +05:30
Abhinav Raut d95a5f40cf feat: add agent cache in user package
- use cached agent in all middlewares
- fix: race in casbin that gave permission denied error.
- stop loading permissions into casbin on every `Enforce` function call instead cache user permissions in authz package and when permissions change only the load permission as policies atomically.
- sort permissions in get-agents to make the permissions slice comparsion using slices.Equal work
2025-06-07 23:43:21 +05:30
Abhinav Raut ade833fb7b fix: waiting_since timestamp being set to null on a non-outgoing message.
- Set to null only after outgoing message is sent
- change imap log from debug to info
2025-06-07 19:57:28 +05:30
Abhinav Raut 625a08d0aa feat(conversation): add support for nested websocket property updates and broadcast changes for all contact and custom attributes 2025-06-07 18:58:17 +05:30
Abhinav Raut d532a99771 feat: new package report, move exisiting report code from conversations pkg to report package
- new sla performance overview cards.
2025-06-06 02:07:19 +05:30
Abhinav Raut 50baa3f38e remove redundant comments for Manager struct across multiple files 2025-06-06 01:04:07 +05:30
Abhinav Raut ea0b7d6d52 docs: update email templating docs with complete variable reference
- adds new `Author` template var and injects it into all templates
- make author fields empty for all automated system generated emails
2025-06-05 01:55:38 +05:30
Abhinav Raut 2efd07b405 add error logs for casbin errors 2025-06-04 00:07:27 +05:30
Abhinav Raut 0b9cf38826 fix: update assignee last seen only if current conversation is open
- standardize timestamp function to uppercase NOW() in SQL queries
2025-06-04 00:07:13 +05:30
Abhinav Raut cd0a357695 fix: change order of macros selection to updated_at descending 2025-06-03 04:41:24 +05:30
Abhinav Raut 8bc0cce993 fix: update default values for visible_when column in macros table 2025-06-03 04:08:29 +05:30
Abhinav Raut f6e2fc1956 feat: allow sending attachments in new conversations
- replace existing combobox selects with common component selectcombobox.vue
2025-06-03 04:03:16 +05:30
Abhinav Raut 5fe5ac5882 fix: change order of macros selection to usage_count descending 2025-06-03 00:56:16 +05:30
Abhinav Raut 975577555d WIP: allow setting macro in new conversations along with attachments
- new composable useFileUpload.js
2025-06-02 03:56:04 +05:30
Abhinav Raut 65cac843cb fix: IMAP fetch blocking introduced by header fetching in this commit - https://github.com/abhinavxd/libredesk/commit/9a651702ce495a5319afb6594e14471e29b31cb0
Two separate fetches caused blocking when first fetch wasn't fully consumed.
Collect all envelope/header data first, then process to prevent deadlock.
2025-05-31 18:24:05 +05:30
Abhinav Raut 23b0481f24 update reference number format in conversation insert query, use - #number format instead of square bracket 2025-05-30 02:01:51 +05:30
Abhinav Raut 9a651702ce fix[imap]: skip auto reply email messages
Fixes #94
2025-05-30 02:00:18 +05:30
Abhinav Raut a0203f882e fix: allow changing conversation status to resolved again & again as agent might change the snooze duration 2025-05-30 00:46:30 +05:30
Abhinav Raut 3998798e54 refactor: rename SQL query names and struct fields for clarity and consistency 2025-05-27 02:45:43 +05:30
Abhinav Raut 70b5da29e1 fix: change SLA deadline fields to use nullable types 2025-05-26 03:48:41 +05:30
Abhinav Raut 88ef5d26db fix: update sla timestamps to nullable types 2025-05-26 03:48:41 +05:30
Abhinav Raut 54bad59392 fix: getConversation to handle nullable UUID parameter 2025-05-26 03:48:41 +05:30
Abhinav Raut 506bb91e20 fix: make sla metric timestamps nullable 2025-05-26 03:48:41 +05:30
Abhinav Raut d1478e1971 fix: clarify comment on SendNotification method regarding SLA linkage 2025-05-26 03:48:41 +05:30
Abhinav Raut 5583b472f7 fix: change debug logs to info level for scheduled SLA notifications 2025-05-26 03:48:41 +05:30
Abhinav Raut b715483260 refactor(conversation): reduce DB I/O by using existing appliedSLAID from conversation
- Passes appliedSLAID directly to SLA logic instead of refetching
- Adds appliedSLAID field to conversation struct (already fetched in get-conversation query)
2025-05-26 03:48:41 +05:30
Abhinav Raut 8ce0464603 fix: simplify time_delay validation in SLA notification schema 2025-05-26 03:48:41 +05:30
Abhinav Raut 7426a09478 feat: allow setting metric per SLA notification, so admins can set SLA alert per metric or just set to all if they want a notification to be sent for all metrics
- Make sla time fields (first response, next response, resolution) optional, only 1 field is required.
2025-05-26 03:48:41 +05:30
Abhinav Raut 8ad2f078ac fix sql query 2025-05-26 03:48:41 +05:30
Abhinav Raut 9226063db3 fix: remove queries using conversation.applied_sla_id
as this column is removed
- fix sql query
2025-05-26 03:48:41 +05:30
Abhinav Raut a9fd4fe2b6 fix: uise existing set next sla deadline sql query and remove duplicate query.
- remove previously added `applied_sla_id` column to conversations table as it was causing cyclic dep
2025-05-26 03:48:41 +05:30
Abhinav Raut 7e8c9962c3 Fixes for next response time sla metric 2025-05-26 03:48:41 +05:30
Abhinav Raut 4c766d8ccb wip: next response metric for sla 2025-05-26 03:48:41 +05:30
Abhinav Raut cb1ec7eb8e fix(availability-status): prevent 'away_and_reassigning' and away_manual agents from being set to 'offline' due to incorrect SQL 2025-05-24 19:42:41 +05:30
Abhinav Raut a89c3dbe04 fix(agent-availability): skip activity log creation when agent returns online from inactivity as it can spam activity logs. 2025-05-20 00:53:28 +05:30
Abhinav Raut e2319714ca fix(imap-email): lowercase all envelope email addresses for consistent matching and deduplication 2025-05-20 00:02:15 +05:30
Abhinav Raut 490aaedb48 fix: update activity log types to use agent prefixes for consistency 2025-05-16 23:11:22 +05:30
Abhinav Raut 7dd5abdda6 fix: swapped target and actor, set them correctly 2025-05-16 23:01:24 +05:30
Abhinav Raut 7f1c2c2f11 feat(wip): activity log / audit log
- single table stores acitivites against entities, actors, timestamps, ip addresses and activity description.
- admin page to view, sort and filter activity logs.
- new `activity_logs:manage` permission
2025-05-16 23:01:24 +05:30
Abhinav Raut 6c9eca3d81 fix: do not computed bcc from latest message. 2025-05-11 20:26:33 +05:30
Abhinav Raut 07b185050e fix: empty recipients in automated replies
- Make recipients list from the latest message recipients for automated replies
2025-05-11 18:51:34 +05:30
Abhinav Raut 66886c34e5 hide conversation subject from sidebar as each message in thread shows the subject (envelope) 2025-05-11 14:40:47 +05:30
Abhinav Raut 0af7265178 refactor: remove unused GetToAddress function and related SQL query 2025-05-11 14:18:07 +05:30
Abhinav Raut 6b2be57049 fix: set correct recipients when a 3rd email is involved in conversation, link to thread discussing this - https://github.com/abhinavxd/libredesk/issues/74#issue-3021419913
refactor move recipient computation to /utils/email-recipients
2025-05-10 23:46:19 +05:30
Abhinav Raut e1b2ec8a4b wip: fix to, bcc, cc handling
- allow agent to set the to address, adds a to address input in the reply box.
- show to, from, bcc and subject in each message
- always use email addresses from message meta instead of querying via get-to-address
- Reorder notification form fields.
- Refactors and adhoc fixes.
2025-05-09 04:30:30 +05:30
Abhinav Raut 25db57805e feat(macros): Filter out macro actions from preview to which agent does not have permissions,
feat(permissions): Seperate our permissions into `src/constants/permissions.js`
2025-04-27 23:09:58 +05:30