Sojan Jose
a2d0e60a88
fix: Get online status from db when not present in cache [CW-3233] ( #9477 )
...
Previously, we returned the static value 'online' when the status was
not present in the Redis cache. This PR changes it to fall back to the
DB value and updates the cache in such cases.
fixes:
https://linear.app/chatwoot/issue/CW-3233/write-a-back-up-for-online-status-in-case-if-redis-keys-are-not
2024-05-15 21:23:19 -07:00
Sojan Jose
d54492f7b5
chore: Add debug statement in spec ( #9466 )
...
- Add a debug statement to check the failed specs
2024-05-14 14:19:02 -07:00
Sojan Jose
9a8442fe0e
chore: Handle conversation participation creation race condition error ( #9449 )
...
We observed some race condition errors in the conversation participation listener while trying to create a conversation participation assignment. This PR handles this error and also adds additional debug information for future.
fixes: https://linear.app/chatwoot/issue/CW-3296/activerecordrecordnotunique-pguniqueviolation-error-duplicate-key
## Changelog
- handles `ActiveRecord::RecordNotUnique, ActiveRecord::RecordInvald` errors so that they won't pollute sentry
- Adds a debug statement to log the cases
- Add previous_changes into the dispatcher so that we know the exact attribute changes which trigger `assignee_changed, team_changed` events ( would be handy in future )
2024-05-10 12:21:23 -07:00
Sojan Jose
4284c123a6
chore: Handle invalid email address in IMAP channel ( #9450 )
2024-05-10 08:55:26 +05:30
Shivam Mishra
eff24c0d71
feat: allow feature plan map in super admin ( #9318 )
...
- Add subscribed_features method in models/enterprise/account and include it in the JSON response
2024-05-08 22:58:46 -07:00
Sojan Jose
3a1299520c
chore: Enable plan reconcile in self hosted ( #9357 )
...
This PR will revert the premium config in self hosted instances to its original state if any unauthorised modifications are made.
2024-05-08 14:26:00 -07:00
Muhsin Keloth
d649bd2dfd
feat: Add support for bulk snooze until ( #9360 )
2024-05-08 08:55:31 +05:30
Shivam Mishra
2ef767d60f
feat: exporting contacts takes the filters into account ( #9347 )
...
- This PR allows contacts to be exported using the current filter in CRM view
Co-authored-by: Sojan Jose <sojan@pepalo.com >
2024-05-07 20:18:36 -07:00
Pranav
de044e29f0
chore: Rescue Oauth2::Error and mark the channel as inactive ( #9358 )
...
Co-authored-by: Sojan <sojan@pepalo.com >
2024-05-07 12:03:38 -07:00
Sojan Jose
f6d7f3b665
fix: assignee_changed callback not getting triggered during conversation creation ( #9334 )
...
The reload method in our callback was refreshing the object and hence the saved_change_to_assignee_id? Method wasn't working in the following callbacks.
This impacted the listeners subscribing to the event `ASSIGNEE_CHANGE`, `TEAM_CHANGE` etc
2024-05-06 11:48:17 -07:00
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
ac93af6028
feat: Support document file uploads on telegram channel ( #9266 )
2024-05-02 14:05:14 -07:00
Pranav
2c3e7d6554
chore: Temporarily disable the disconnect logic for inboxes ( #9321 )
...
* chore: Temporarily disable the disconnect logic for inboxes
* Remove unused spec
2024-04-30 07:49:37 -07:00
Shivam Mishra
78f94511ff
feat: add sitemap for help center ( #9280 )
...
* feat: start sitemap
* feat: add base url and last mod to sitemap
* fix: typo
* test: sitemap generation
* test: add draft articles
* fix: escape dots in regex matching
* feat: perpend protocol to the url
* feat: use ChatwootApp.help_center_root
* feat: don't parse the URL
* fix: function declaration
2024-04-26 21:36:39 +05:30
Pranav
ffd47081bd
chore(cleanup): Delete sentiment feature ( #9304 )
...
- The feature is unused, removing it for now, will bring it back with better models later.
2024-04-25 22:49:10 -07:00
Pranav
77db0d0701
feat: Add configurable interval for IMAP sync ( #9302 )
2024-04-25 18:58:20 -07:00
Muhsin Keloth
1bf3ad9a08
fix: Remove unnecessary attributes from notification deleted action cable event payload ( #9295 )
...
fix: simplify notification deleted payload event
2024-04-25 11:25:19 +05:30
Muhsin Keloth
d7e928df26
feat: Add loom video embed support for help center articles ( #9288 )
...
* feat: Add loom support for helpcenter articles
* fix: responsiveness
* fix: style issues
* fix: review comments
* Update custom_markdown_renderer.rb
2024-04-24 11:44:10 +05:30
Sojan Jose
15638e9b8b
chore: Add validation to prevent message flooding ( #9254 )
...
- Add a validation to limit messages created per minute to avoid message flooding cases.
2024-04-18 00:14:59 -07:00
Sojan Jose
42a457ff5d
feat: Use embeddings in help center search ( #9227 )
2024-04-15 16:35:23 -07:00
Shivam Mishra
bce2a07d03
feat: do not send contact details to the widget ( #9223 )
...
* refactor: use has_email instead of email
* feat: remove usage of details directly in forms
* test: update payload
* test: fix transcript test
* refactor: use computed hasEmail
---------
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com >
2024-04-12 15:30:07 +05:30
Sivin Varghese
3b6ae772bf
feat: SLA report filter ( #9218 )
...
Co-authored-by: Shivam Mishra <scm.mymail@gmail.com >
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com >
2024-04-12 11:03:18 +05:30
Pranav
e8fe3c7c05
fix: Terminate IMAP connection after the job is complete ( #9225 )
2024-04-11 15:47:43 -07:00
Red
9013450e00
fix: Fixes 9012 Cancelling Google OAuth signup redirects user to /auth/sign_in ( #9022 )
...
Overriding new_user_session action to avoid rendering error directly in webpage
2024-04-10 12:12:48 +05:30
Muhsin Keloth
1038d1500e
feat: SLA reports view ( #9189 )
...
* feat: SLA report table
* feat: Add SLA popover card
* feat: Update popover position
* feat: Add loader
* Update SLACardLabel.vue
* feat: Update column order
* chore: fix conditions
* Update SLATable.vue
* chore: enable reports in ui
* chore: Revamp report SLA apis
* chore: revert download method
* chore: improve the code
* Update enterprise/app/views/api/v1/accounts/applied_slas/download.csv.erb
Co-authored-by: Vishnu Narayanan <iamwishnu@gmail.com >
* chore: style fixes
* chore: fix specs
* feat: Add number of conversations
* chore: review comments
* fix: translation
* Update app/javascript/dashboard/i18n/locale/en/report.json
Co-authored-by: Vishnu Narayanan <iamwishnu@gmail.com >
* Update app/javascript/dashboard/i18n/locale/en/report.json
Co-authored-by: Vishnu Narayanan <iamwishnu@gmail.com >
* Update app/javascript/dashboard/i18n/locale/en/report.json
Co-authored-by: Vishnu Narayanan <iamwishnu@gmail.com >
* Update SLAReportItem.vue
* Update report.json
* Update package.json
* chore: review comments
* chore: remove unused translation
* feat: Add TableHeaderCell component
* chore: more review fixes
* Update app/javascript/dashboard/components/widgets/TableHeaderCell.vue
Co-authored-by: Shivam Mishra <scm.mymail@gmail.com >
* Update TableHeaderCell.vue
---------
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com >
Co-authored-by: Vishnu Narayanan <iamwishnu@gmail.com >
Co-authored-by: Shivam Mishra <scm.mymail@gmail.com >
2024-04-09 10:14:36 +10:00
Shivam Mishra
2397f817fb
fix: add priority in filter keys [CW-3177] ( #9179 )
...
* fix: ConditionValidationService fails on conversation priority
* fix: custom attribute clash in spec
2024-04-05 10:03:48 +05:30
Sojan Jose
18bfda35b3
chore: Fix agent API returning 500 error ( #9193 )
...
- We were using the @user object in the view, which wasn't available when using api_access_token.
- Also replaced the object to @agent and added additional specs to confirm the right object
fixes: https://linear.app/chatwoot/issue/CW-3185/agent-create-api-throwing-500-response
ref: https://discord.com/channels/647412545203994635/1219928138163949568/1219928138163949568
2024-04-04 19:44:47 +05:30
Sojan Jose
5c9acfb4e9
chore: Handle duplicate Webhooks from slack ( #9187 )
...
* chore: Handle duplicate Webhooks from slack
* chore: fixes
---------
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com >
2024-04-04 17:00:45 +05:30
Jaideep Guntupalli
e21d7552d3
feat: extending lock to single conversation to meta inbox ( #9104 )
...
This change introduces the ability to lock conversations to a single thread for Instagram and facebook messages within the Meta inbox, mirroring existing functionality in WhatsApp and SMS inboxes.
Co-authored-by: Shivam Mishra <scm.mymail@gmail.com >
2024-04-03 21:33:23 +05:30
Sojan Jose
4e28481f27
feat: Conversation API to return applied_sla and sla_events ( #9174 )
...
* chore: Add sla_events to push_event_data
* chore: Return SLA details in the API
* chore: feature lock sla push event data
* Update _conversation.json.jbuilder
* chore: rubocop fixes
2024-04-01 23:30:07 +05:30
Vishnu Narayanan
16282f6a66
feat: Add push/email notification support for SLA ( #9140 )
...
* feat: update SLA evaluation logic
* Update enterprise/app/services/sla/evaluate_applied_sla_service.rb
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com >
* chore: refactor spec to bring down expecations in a single block
* chore: fix process_account_applied_sla spec
* chore: add spec to test multiple nrt misses
* feat: persist sla notifications
* feat: revert persist sla notifications
* feat: add SLA push/email notification support
* chore: refactor sla_status to include active_with_misses
* chore: add support for sla push/email notifications
* chore: refactor
* chore: add liquid templates
* chore: add spec for liquid templates
* chore: add spec for sla email notifications
* chore: add spec for SlaPolicyDrop
* chore: refactor to ee namespace
* chore: set enterprise test type to mailer
* feat: enable sla notification settings only if SLA enabled
* chore: refactor
* chore: fix spec
---------
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com >
2024-03-29 20:27:21 +11:00
Vishnu Narayanan
6956436a76
feat: refactor SLA evaluation logic ( #9133 )
...
* feat: update SLA evaluation logic
* chore: handle nrt
* chore: handle applied_sla status
* chore: refactor spec to bring down expecations in a single block
* chore: fix process_account_applied_sla spec
* chore: add spec to test multiple nrt misses
* feat: persist sla notifications
* feat: revert persist sla notifications
* chore: refactor sla_status to include active_with_misses
* chore: refactor spec
* Update evaluate_applied_sla_service.rb
* minor refactors
* clean up
* move notification related spec
* chore: refactor notifications spec to sla_event model
---------
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com >
Co-authored-by: Sojan Jose <sojan@pepalo.com >
2024-03-29 02:01:43 +11:00
Shivam Mishra
9a1c54a82d
feat: disable automation rules if condition fails multiple times ( #9017 )
...
* feat: add email for disabling automation rule
* feat: disable automation rules and notify admin
* feat: reset error count after update
* feat: trigger invalid_condition_error if rule is invalid
* feat: setup error trackable concern
* refactor: use ErrorTrackable in Reauthorizable
* fix: optional argument
* feat: separate reauthorization_required_key
* test: update case to use ERROR_TRACKABLE_COUNT
* Revert "test: update case to use ERROR_TRACKABLE_COUNT"
This reverts commit f439847147556a02759a7597a7fcf1d66091cafc.
* Revert "feat: separate reauthorization_required_key"
This reverts commit f4514fce217b0a2f2c2bf701a15de0a8b47acbc4.
* Revert "fix: optional argument"
This reverts commit 93b4194ec3f10f67e2402388c966c071c4d3b4fd.
* Revert "refactor: use ErrorTrackable in Reauthorizable"
This reverts commit 513c2a522bc782e73ea4b0f5ae34ce01e70e042c.
* Revert "feat: setup error trackable concern"
This reverts commit 278683060cf422f60af5d5c77100aa5272141141.
* feat: use reauthorizable for automation rule
* feat: remove redis key
* test: fix method names
* chore: refactor
---------
Co-authored-by: Vishnu Narayanan <iamwishnu@gmail.com >
Co-authored-by: Sojan <sojan@pepalo.com >
2024-03-28 13:14:16 +05:30
Shivam Kumar
1253264382
fix: Avoid duplicate invitation emails when adding an agent ( #9131 )
...
Co-authored-by: Sojan <sojan@pepalo.com >
Co-authored-by: Shivam Mishra <scm.mymail@gmail.com >
Co-authored-by: Pranav <pranav@chatwoot.com >
2024-03-26 18:58:45 -07:00
Shivam Mishra
d1dd319091
feat: API to download breached conversations ( #9150 )
...
* feat: add download conversations endpoint
* feat: template for conversation list download
* feat: setup download API and tests
* chore: revert formatting change
* feat: rename download method
* feat: rename template
* feat: include sla_policy table in download query
* refactor: add nil safety to assignee
* chore: Update en.yml
* fix: remove applied_sla relation
2024-03-26 09:22:49 +05:30
Muhsin Keloth
48452a42f4
feat: Add SLA metrics API ( #9132 )
2024-03-25 12:24:43 +05:30
Sojan Jose
1303469087
feat: Ability filter blocked contacts ( #9048 )
...
- This PR introduces the ability to filter blocked contacts from the contacts filter UI
2024-03-20 18:11:50 +05:30
Pranav
f78f278e2f
fix: Update validations for filter service ( #8239 )
...
- Refactor filter service for better readability and maintenance
- Add validations for the following:
- If an invalid attribute is passed, a custom exception InvalidAttribute will be thrown.
- If an invalid operator is passed, a custom exception InvalidOperator will be thrown.
- If an invalid value (currently checking only null check), a custom exception InvalidValue will be thrown.
Fixes: https://linear.app/chatwoot/issue/CW-2702/activerecordstatementinvalid-pginvalidtextrepresentation-error-invalid
Fixes: https://linear.app/chatwoot/issue/CW-2703/activerecordstatementinvalid-pginvaliddatetimeformat-error-invalid
Fixes: https://linear.app/chatwoot/issue/CW-2700/activerecordstatementinvalid-pgsyntaxerror-error-syntax-error-at-or
Co-authored-by: Sojan <sojan@pepalo.com >
2024-03-20 16:29:36 +05:30
Vishnu Narayanan
b017d05ed9
feat: add sla events table ( #9126 )
...
* feat: add sla events table
* chore: refactor to EE namespace
* chore: refactor
* chore: fix spec
* chore: add references to account,inbox,sla_policy
* chore: update specs
* chore: update spec to check backfilling id's
* Update spec/enterprise/models/sla_event_spec.rb
2024-03-20 11:59:37 +05:30
Sivin Varghese
476077ab84
fix: Update location component to avoid overflow, handle location title from Telegram payload ( #9113 )
...
Co-authored-by: Pranav <pranav@chatwoot.com >
2024-03-14 22:53:43 -07:00
Muhsin Keloth
586552013e
feat: Update the contact_type when creating or updating the contact ( #9107 )
...
* feat: Update location and country code when the contact create/update
* feat: Update the location and country_code when creating or updating the contact.
* chore: improve comments
* feat: Update the contact_type when the contact created/updated
* chore: add more specs
* chore: code cleanups
* chore: code cleanups
* Update contact_spec.rb
* Update inbox.rb
* Update sync_attributes_spec.rb
* chore: build fixes
* chore: check visitor type before update
* chore: review fixes
2024-03-15 10:55:40 +05:30
Sojan Jose
3dae3ff3ad
feat: Conversation update API for sla_policy_id ( #8973 )
...
- Add an endpoint for updating conversation attributes (priority / sla_policy_id )
- Swagger spec
- minor chores around the conversation API/spec
Fixes: https://linear.app/chatwoot/issue/CW-2100/feat-backend-api-to-update-the-sla-of-a-conversation
2024-03-14 17:22:32 +05:30
Vishnu Narayanan
7f4b2d66d4
feat: add activity message for SLA ( #9100 )
...
* feat: add activity message for SLA
* chore: refactor to reduce method complexity
* chore: refactor
* feat: add spec for SLAactivity message
* chore: move SLA spec to enterprise folder
* chore: move team activity methods to a separate module
* chore: fix typo
* chore: move sla activity message spec to conversation model
2024-03-13 20:05:34 +05:30
Muhsin Keloth
804a42c271
feat: Update the location and country_code when creating or updating the contact ( #9106 )
...
* feat: Update the location and country_code when creating or updating the contact.
* chore: improve comments
2024-03-13 16:40:21 +05:30
Vishnu Narayanan
aaf70cf1cf
feat: add push notification when SLA missed ( #9078 )
...
* feat: add push notification when SLA missed
* chore: sent notification only for inbox members
* feat: add conv particpants+admins to SLA notification list
* chore: add spec to ensure notification is created
* chore: refactor to multiple alerts for SLA conditions
* chore: add sla_policy as secondary_actor in notification
2024-03-11 21:49:41 +05:30
Muhsin Keloth
216de4d123
fix: Conversation assignment notification title ( #9071 )
2024-03-06 23:05:13 +05:30
Muhsin Keloth
ef90b7a3d8
feat: Revamp the notification title and content ( #8988 )
2024-03-06 20:51:56 +05:30
Muhsin Keloth
58dd2633ba
feat: Add contact helper ( #8989 )
2024-03-06 17:39:39 +05:30
Shivam Mishra
c62c512ec4
fix: inline attachments not handled if tag was missing ( #9068 )
2024-03-06 17:15:29 +05:30
Sojan Jose
881d4bf644
feat: Add backend APIs for the bot metrics ( #9031 )
...
Co-authored-by: Pranav <pranav@chatwoot.com >
2024-03-01 08:20:20 -08:00