Commit Graph

19 Commits

Author SHA1 Message Date
Shivam Mishra
1a2e6dc4ee feat: integrate LeadSquared CRM (#11284) 2025-04-29 09:14:00 +05:30
Shivam Mishra
abc511d00f fix: inconsistent OpenAI cache interface (#10009)
Signed-off-by: Shivam Mishra <scm.mymail@gmail.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2024-08-22 23:04:14 +05:30
Muhsin Keloth
eb6de74269 fix: OpenAPI label suggestion response payload (#10008) 2024-08-22 15:32:33 +05:30
jderecho
0d7773d88f feat: Draft through API for Cross-Device Support (#8018)
- Add APIs for cross-device message drafts

ref: #6890
2024-05-02 18:42:18 -07:00
Sojan Jose
390cd756e8 chore: Reorganize the installation config settings (#8794)
- Reorganizing installation config settings to move more configurations into UI from environment variables
- Changes to installation config to support premium plans in the enterprise edition
- Fixes the broken premium indicator in account/show and accounts/edit page
2024-01-31 16:48:42 +04:00
Pranav Raj S
fdbb3bf4b1 fix: Optimize email fetching logic to fix bandwidth exceeded issues (#8730)
The Inboxes::FetchImapEmailsJob is designed to fetch the entire email object and check if its message id is already in the database. However, this process is resource-intensive and time-consuming, as fetching the full email object takes a significant amount of time.

On average, fetching 100 emails can take approximately 3-4 minutes to complete depending on the IMAP server. Since we are not using server flags to identify which emails have already been fetched (to avoid compatibility issues with flags in different email services), we have to fetch all previously available emails. Currently we fetch all the messages that were created from yesterday. This becomes problematic with services like Gmail, which throttle requests based on bandwidth usage.

To address this issue, I have updated the logic as follows:

Fetch the sequence IDs of all the mails in the "Inbox" that were created from yesterday.
Use the FETCH command to fetch only the message-ids using BODY.PEEK[HEADER.FIELDS (MESSAGE-ID)] with the sequence IDs we got in the previous step. This is a faster operation with lower bandwidth usage, as it only returns the sequence ID and message ID.
Check if the message IDs are already present in the database for the selected inbox.
If not present, fetch the entire email object using the FETCH command and create the message.
If the message ID is already present, ignore it and move on to the next message-id.
I have also addressed the issue of duplicate emails appearing in conversations when two fetch email jobs occur simultaneously. I have added a lock for the channel to ensure that the job gracefully exits without waiting for the current job to complete.

Fixes #7247
Fixes #6082
Fixes #8314

Co-authored-by: Sojan <sojan@pepalo.com>
2024-01-18 11:45:16 +04:00
Pranav Raj S
6c4b92f7f6 fix: Revert the changes for SyncCustomFilterCountJob (#8238) 2023-10-27 10:45:48 -07:00
Shivam Mishra
336584c95a feat: mutex for InstagramEventsJob [CW-2447] (#7828) 2023-09-04 15:02:13 +05:30
Shivam Mishra
2acf09b3eb refactor: use conversation_id instead of sender_id (#7831) 2023-08-31 16:10:37 +07:00
Shivam Mishra
5598b4b27e feat: implement mutex for SlackSendJob (#7783) 2023-08-25 11:58:29 +07:00
Shivam Mishra
26ef21a243 feat: locking and retry in FB message parsing (#7701) 2023-08-23 09:48:17 +07:00
Shivam Mishra
a940f4c1d2 feat: Allow label suggestions with OpenAI APIs (#7428) 2023-07-10 14:40:54 +05:30
Tejaswini Chile
9d0de04f7c fix: set custom filter count in redis (#7164) 2023-06-19 16:10:03 +05:30
Tejaswini Chile
b081fe08b8 feat: whatsapp duplicate message (#7004) 2023-05-03 15:18:20 +05:30
Sojan Jose
14eefe3824 feat: Add Installation onboarding flow (#1640)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-01-17 14:07:18 +05:30
Sojan Jose
346830ab1d feat: Add Cron Jobs In Chatwoot and update installation notice (#1630) 2021-01-11 17:34:41 +05:30
Sojan Jose
a988724c91 feat: Authenticate by SSO tokens (#1439)
Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
2020-11-25 13:59:38 +05:30
Sojan Jose
b862817b29 feat: Enable reauthorization for Facebook (#1286) 2020-09-30 01:12:32 +05:30
Sojan Jose
0fc0dc1683 Chore: Refactor round robin logic (#1015)
Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
2020-07-08 00:14:07 +05:30