Commit Graph

3230 Commits

Author SHA1 Message Date
Chatwoot Bot
54bf33083e chore: Update translations (#7372)
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2023-06-23 16:01:14 +05:30
Luis
533f9f7fe4 fix: Email collect overriding existing contact name (#7355)
Currently, if Enable email collect box is enabled, and the user starting the chat already has an account with the same email, it will override the current account with {name} from the email name@email.com , this fixes it.

Co-authored-by: Sojan <sojan@pepalo.com>
2023-06-22 19:09:12 +05:30
OMAR.A
82e5fc413e fix: Label Duplication in Bulk Actions (#7341)
When looping the conversations in bulk action to assign them to new labels, the existing labels in other conversations were also getting duplicated across all conversations. This PR fixes the issue. 

> In the previous implementation, new_labels is appended to the existing labels using the << operator. This operator modifies the original array instead of creating a new one, causing unwanted side effects. More specifically, new_labels is a reference to the original argument array of the method.

Co-authored-by: Sojan <sojan@pepalo.com>
Co-authored-by: Peter Salib <74493166+Peteraymansalib@users.noreply.github.com>
2023-06-22 18:36:58 +05:30
Pranav Raj S
93daaea19b feat: Add a sort option for conversations waiting for a reply from an agent (#7364) 2023-06-21 13:20:39 -07:00
Nithin David Thomas
e6a49b5800 feat: Shows Youtube and Vimeo links as embeds [cw-1393] (#7330)
This change will render the youbtube, vimeo and .mp4 urls as embedded in the article page in the help centre.

Fixes: https://linear.app/chatwoot/issue/CW-1393/help-center-support-video-upload-in-articles

Co-authored-by: Sojan <sojan@pepalo.com>
2023-06-21 20:28:28 +05:30
Sojan Jose
595e6e79f0 chore: Add sla policy association to conversation (#7360)
Adds the sla policy association to the conversation

Fixes: https://linear.app/chatwoot/issue/CW-1615/applying-an-sla-to-the-conversation
2023-06-21 14:48:50 +05:30
Sivin Varghese
93d8157a55 feat: Adds Lithuanian language selectable as site language (#7354) 2023-06-20 17:29:05 +05:30
Vishnu Narayanan
6bea2cbc4a feat: add audit trail for macros (#7352) 2023-06-20 13:04:59 +05:30
Tejaswini Chile
afb7e67795 fix: empty account variable for custom_attrbute_definition running in background job (#7351) 2023-06-20 12:15:36 +05:30
Vishnu Narayanan
bc813b71dd feat: refresh the audit page on navigation without manual reload (#7292)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
2023-06-20 09:36:16 +05:30
Shivam Mishra
9ac4a1eb30 refactor: multiple fixes to contact header [CW-2081] (#7331)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2023-06-19 21:58:33 +05:30
Muhsin Keloth
9bb455ec2d feat: Ability to choose the custom time for snooze conversation (#7257) 2023-06-19 18:23:35 +05:30
Chatwoot Bot
c410fe333a chore: Update translations (#7347)
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2023-06-19 17:27:43 +05:30
Jordan Brough
5e807c5875 chore: Remove unneeded include EnsureCurrentAccountHelper (#7339)
This class inherits from Api::V1::Accounts::BaseController, which already includes EnsureCurrentAccountHelper and also sets up before_action :current_account.
2023-06-19 17:18:07 +05:30
Muhsin Keloth
9bed57c7d1 feat: Add more snooze options (#7344) 2023-06-19 17:05:16 +05:30
Sojan Jose
5c5381c0a9 chore(ci): Ensure PR titles are in semantic format (#7346) 2023-06-19 16:48:45 +05:30
Jordan Brough
138630b4ae chore: Update method to access "secret_key_base" (#7337)
This will look at environment variables and Rails Credentials, and Rails Secrets.
See documentation here: https://api.rubyonrails.org/v7.0.5/classes/Rails/Application.html#method-i-secret_key_base
2023-06-19 16:11:19 +05:30
Tejaswini Chile
9d0de04f7c fix: set custom filter count in redis (#7164) 2023-06-19 16:10:03 +05:30
Muhsin Keloth
2c3337b117 feat: Move snooze actions to command bar (#7343) 2023-06-19 13:57:59 +05:30
Shivam Mishra
237358af24 refactor: use as_json for formatting the string (#7332) 2023-06-19 13:33:48 +05:30
Sivin Varghese
35dfff0a5b feat: Attachment view improvements (#7314) 2023-06-19 11:16:28 +05:30
Pranav Raj S
86b2896333 feat: Show alerts when the limit is reached in accounts (#7323)
Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
2023-06-15 20:47:11 -07:00
Shivam Mishra
e8a27bea4b feat: Add APIs for limit check in accounts (#7242) 2023-06-15 20:11:40 -07:00
Sojan
0d465362ac Merge branch 'release/2.18.0' into develop 2023-06-15 18:45:01 +05:30
Sojan
e383e9259b Bump version to 2.18.0 2023-06-15 18:44:13 +05:30
Muhsin Keloth
2c34dca347 fix: NS_ERROR_STORAGE_BUSY warnings in firefox (#7319)
Fixes: https://linear.app/chatwoot/issue/CW-2075/ns-error-storage-busy-no-error-message
2023-06-15 17:53:26 +05:30
Pranav Raj S
69b9123963 fix: Use available_name only (#7312)
We have display_name and the actual name for an agent. display_name is used in all public facing parts. The https://github.com/chatwoot/chatwoot/pull/7232/files PR missed this and used actual name instead.

This PR fixes it.
2023-06-15 17:52:53 +05:30
Shivam Mishra
cac9fe1880 Revert "feat(perf): update query to reduce N+1 impact [CW-1926] (#7228)" (#7271)
This reverts commit f28533bc47.
2023-06-15 16:23:56 +05:30
Nithin David Thomas
06ac7c829b fix: Fixes wrong variable usage in transcript file (#7316) 2023-06-15 16:00:21 +05:30
Shivam Mishra
9985f1c143 refactor: remove redundant taggable declaration (#7310) 2023-06-15 12:57:56 +05:30
Tejaswini Chile
1ee6a8fe90 chore: Add validation for processed content field (#7306)
* logging the messages id for message validation exception

* Update the processed_message_content validation over length

* codeclimate

* specs failing for contacts
2023-06-14 18:28:42 +05:30
Muhsin Keloth
6eb4fa41ff feat: Add sender details and message create date in the attachment API (#7308) 2023-06-14 17:29:13 +05:30
Snyk bot
8b91f0ffac fix: Gemfile.lock to reduce vulnerabilities (#7280)
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-RUBY-RACK-1061917

Co-authored-by: Sojan Jose <sojan@pepalo.com>
2023-06-14 15:40:24 +05:30
Nithin David Thomas
d2aa19579e feat: Adds support for superscript in help center articles (#7279)
- Adds support for superscript when rendering article markdown
- Chatwoot Markdown Render to render markdown everywhere

Co-authored-by: Sojan <sojan@pepalo.com>
2023-06-14 15:39:00 +05:30
Shivam Mishra
2e79a32db7 fix: calculation for resolution count (#7293)
* fix: calculation for resolution count

* test: resolution count bug fix

- ensure enqueued jobs are run
- fix the dates check, conversations resolved today should show up in today

* feat: ensure conversations are resolved

* test: do not count extra events if the conversation is not resolved currently

* fix: typo
2023-06-14 13:50:10 +05:30
Shivam Mishra
a86e236d19 feat: update cache headers for cache_keys (#7283)
Update the cache headers for cache_keys to max-age=10, private, stale-while-revalidate=300

1. The cache will be fresh for 10 seconds (max-age=10). During this time, the browser will use the cached version without checking with the server.
2. After the initial 10 seconds, the browser can continue to serve the stale cache for up to 5 minutes (stale-while-revalidate=300). During this period, it will also try to revalidate and update the cache in the background.
3. After 310 seconds in total (10 seconds fresh, 300 seconds stale), if the browser has not been able to revalidate the cache, it will attempt to fetch the fresh resource directly from the server for subsequent requests, causing potential latency equivalent to a network request.

This means that the data will be directly revalidated only every 5 mins. Other times, it will stay fresh for 10 seconds and revalidate in the background. In most cases, we won't have to rely on a cache validation check because there is a WebSocket event for revalidation, so we know if something changes.

Right now the stale-while-revalidate is 5 minutes, we can then move it to 15 minutes.

> The stale-while-revalidate header is not supported in Safari, for Safari the cache keys will only stay in memory for 10 seconds before being marked stale
2023-06-14 13:21:51 +05:30
Shivam Mishra
c755978352 feat: update banner design [CW-1491] (#7296)
* refactor: banner styling

* refactor: update button style for reply assign banner

* feat: remove update-banner classes

---------

Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
2023-06-14 12:56:42 +05:30
Tejaswini Chile
23ca6d56f9 feat: Contact Exports (#7258) 2023-06-13 09:18:43 +05:30
Shivam Mishra
429ec7194f feat: add index to reporting events [CW-1960] (#7294)
* fix: annotation

* feat: add better index for reporting_events
2023-06-12 18:23:42 +05:30
Tejaswini Chile
c99d9f9557 fix: search for nil in-reply-to messages (#7286) 2023-06-12 16:01:56 +05:30
Vishnu Narayanan
9ff5978d6e feat: Add audit trail events for team (#7285) 2023-06-09 17:30:36 -07:00
Muhsin Keloth
cd28f401ba fix: Custom attribute date is not working in some time zone (#7224) 2023-06-09 16:55:03 -07:00
Tejaswini Chile
879a244f93 fix: Automations condition based quoted text (#7272) 2023-06-09 17:00:05 +05:30
Tejaswini Chile
f64f2138db fix: Update mail check for html_part (#7273) 2023-06-09 16:08:40 +05:30
Sojan Jose
48f2e58e59 feat: Ability to update avatars from super admin (#7264)
- Ability to update user avatars from super admin
- Ability to update bot avatars from super admin

fixes: #7060
2023-06-09 15:32:24 +05:30
Chamath K.B. Attanayaka
c715e396f0 feat: added input_select type message support for whatsapp (#6886)
- Added input_select message type support for Whatsapp Cloud API and Whatsapp 360dialog.

Co-authored-by: Sojan Jose <sojan@pepalo.com>
2023-06-09 15:20:45 +05:30
Pranav Raj S
c8fac08e0b fix: Cannot read properties of undefined (reading 'some') (#7278)
Fixes https://linear.app/chatwoot/issue/CW-2041/typeerror-cannot-read-properties-of-undefined-reading-some
Fixes https://linear.app/chatwoot/issue/CW-2042/typeerror-cannot-read-properties-of-undefined-reading-filter
2023-06-08 20:12:14 -07:00
Sivin Varghese
7fd220c177 feat: Adds the ability to edit saved segments (#7254)
* feat: Ability to edit saved filters

* chore: Adds edit contact segment

* chore: Minor fixes

* fix: code climate

* chore: Minor fixes

* chore: Adds ability to custom view name

* chore: Minor fixes

* chore: Adds spec for helper

* chore: Revert contact filter to split to new PR

* Delete editSegmentMixin.js

* chore: Revert fixes

* Update app/javascript/dashboard/i18n/locale/en/advancedFilters.json

Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>

* Update app/javascript/dashboard/i18n/locale/en/advancedFilters.json

Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>

* chore: Moved from mixin to helper for reusing in segments

* Delete editFolderMixin.js

* chore: Fix specs and added new specs

* chore: review comment fixes

* chore: Minor fixes

* fix: Not resetting applied filter

* feat: Adds the ability to edit saved segments

* feat: Adds specs for API part

---------

Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
2023-06-08 21:25:51 +05:30
Pranav Raj S
b3b76d00ff fix: Do not use the default value if the out of office message is empty (#7268) 2023-06-08 08:22:10 -07:00
Shivam Mishra
2f2ae88cba fix: unattended count mismatch in report and list (#7263) 2023-06-08 17:58:13 +05:30