Commit Graph

161 Commits

Author SHA1 Message Date
Abhinav Raut 450b609d47 fix: handle null string form value for update contact form 2025-04-15 03:45:45 +05:30
Abhinav Raut d5ba70667d feat: allow notes to be deleted only by the owner of note and any agent with role Admin 2025-04-15 02:47:52 +05:30
Abhinav Raut a9f9d368b9 refactor: replace contacts:manage with with more granular permissions like contacts:read_all, contacts:read, contacts:block etc.
fix: filter out unknown permissions from role form while submitting
fix: correct strong password validation logic on reset
refactor: remove contact note update handler as it adds more complexity agents can simply delete note.
feat: new block contact api which required contacts:block perm
2025-04-15 02:23:47 +05:30
Abhinav Raut 2fc642c34e feat: allow using contact custom attributes in automation rules 2025-04-15 02:23:47 +05:30
Abhinav Raut a0c77bc12e feat: contact notes
refactor:  split code in internal/users/users.go into following files
internal/users/notes.go
internal/users/agent.go
internal/users/contact.go
2025-04-15 02:23:47 +05:30
Abhinav Raut d69a8c58d1 feat: custom attributes for contacts and conversations 2025-04-15 02:23:47 +05:30
Abhinav Raut cd429b9751 fix: add frontend page handler for /contacts/ 2025-04-10 19:07:41 +05:30
Abhinav Raut 143a12e3c3 fix: send correct error msg when email is invalid
fix: trim space around email address
2025-04-10 18:29:04 +05:30
Abhinav Raut b2a53b18d5 feat: manage contacts
- New permission `contacts:manage`
- Views for contact list and single contact view.
- Ability to block contacts that in inturn stops new messages from the contact.
- Make all DB transactions that run dynamically generated SQL query `readonly`
- Rename `/admin/teams/users` to `/admin/users/agents/` for consistency. (ref #50)
- Fix UI glitches for long emails (refs #54)
- Fix empty created_at date for agents admin table (refs #51)
- Migrations for v0.6.0
2025-04-10 04:13:11 +05:30
Abhinav Raut 9bfe014d1e WIP: manage contacts page 2025-04-09 16:52:25 +05:30
Abhinav Raut 1821647695 feat: allow admins to set availability status
remove unnecessary column `reassign_replies` instead add a new enum `away_and_reassigning` to enum user availability status
2025-04-05 18:12:42 +05:30
Abhinav Raut 6d588f7a4e feat: show user summary on /admin/users
- Displays metrics like last active at, last login along with the avatar.
- Adds new column `last_login_at` to users table.
- Updates translations for the same
2025-04-04 22:00:26 +05:30
Abhinav Raut 2a382d6036 feat: Toggle button for user to reassign replies to conversations if they are away, user status now actually affects the conversation workflow.
Online: Conversations are auto-assigned.
Auto-away (inactivity in browser): Marks agent as away without stopping assignment (nothing changes for agent).
Manual away: Prevents new conversations from being assigned. (option available in the sidebar)
Reassign replies: Customer replies unassigns the conversation, returning it to the team inbox / unassigned inbox.
2025-04-04 03:29:16 +05:30
Abhinav Raut c639bfba40 update welcome email subject 2025-04-03 03:15:36 +05:30
Abhinav Raut 2daefccd79 fix: translation keys 2025-04-03 03:00:11 +05:30
Abhinav Raut f69e8dd4f8 fix: update translation for business hours empty name error 2025-04-03 02:16:51 +05:30
Abhinav Raut d171958223 fix: translation key param 2025-04-03 02:14:57 +05:30
Abhinav Raut 3b7550fcf3 fix: update incorrect translation key 2025-04-03 02:11:05 +05:30
Abhinav Raut 6b6549cb03 standardize i18n keys for consistency rename keys
fix: avatar url `null` console warnings.
2025-04-03 01:21:12 +05:30
Abhinav Raut dd8053b2bb feat: translate templates 2025-04-03 01:21:12 +05:30
Abhinav Raut 72b92d6c66 feat: translate email notifications 2025-04-03 01:21:12 +05:30
Abhinav Raut 25f23735d5 feat: translate admin email inbox forms 2025-04-03 01:21:12 +05:30
Abhinav Raut 4361250c73 feat: backend api response translations 2025-04-03 01:21:12 +05:30
Abhinav Raut eb707fd8de Merge pull request #38 from jleroy/fix-unsecure-cookies
Allow to disable cookies secure flag when needed
2025-03-31 01:34:52 +05:30
Abhinav Raut 4b8a954043 fix: update error message for invalid session to suggest clearing cookies 2025-03-25 02:01:08 +05:30
Abhinav Raut 6ac9f28a32 fix: upsert user teams only when newly created user has a team.
- update error msg for empty permissions
2025-03-25 01:41:18 +05:30
Abhinav Raut 8101c202fa improve logging messages for database installation and system user creation 2025-03-25 01:40:39 +05:30
Abhinav Raut a2cdd728c0 remove app version print 2025-03-25 01:11:56 +05:30
Abhinav Raut 6b4f243b74 chore: more validations before savign an inbox
chore: update error msgs for clarity
2025-03-25 00:47:35 +05:30
Abhinav Raut 698e2d960e chore: add more comments to message handlers. 2025-03-24 23:13:55 +05:30
Abhinav Raut a8db8f64b5 refactor: conversation handlers to use existing enforceConversationAccess function for authz check 2025-03-24 23:13:23 +05:30
Jonathan Leroy a5a9d1304c Allow to disable cookies secure flag when needed 2025-03-24 12:24:50 +01:00
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 83b891c92a fix: import tz data in main.go 2025-03-15 00:27:46 +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 09703c1090 migrations for v0.5.0 2025-03-12 02:45:32 +05:30
Abhinav Raut d1f931106d fix: do not reopen onversations on agent messges, let the agents open conversations by themselves. 2025-03-12 02:40:06 +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 79a3f0ff70 refactor: move set SLA deadlines to SQL query and remove from code 2025-03-12 02:31:19 +05:30
Abhinav Raut a4cb373f32 fix: validate time durations and ensure first response time is less than resolution time in SLA handling 2025-03-11 02:47:55 +05:30
Abhinav Raut f12efe5511 fix: remove trailing slash from root URL in settings update 2025-03-09 16:43:40 +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 57c1948379 fix[OOM]: fix read buffer size configuration in server settings, the readbuffer was set to the max body size making the binary go OOM. 2025-03-06 15:10:23 +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 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 eb499f64d0 chore: adds v0.4.0 to migration list. 2025-03-05 02:33:03 +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 10b4f9d08c feat: show app version in admin tab
fix: view form validations and issues with reactivity
feat: save team inbox and view inbox dropdown state in localstorage.
fix: view inbox dropdown icon alignment.
2025-03-02 20:49:19 +05:30
Abhinav Raut 8f6295542e fix: destroy user session when user account is disabled. 2025-03-02 19:17:42 +05:30