Commit Graph

4706 Commits

Author SHA1 Message Date
Chatwoot Bot
4397ee7d3b chore: Update translations, add pnpm sync:i18n command (#10893)
Added a command to sync files in the locale/*/ folder. Run `pnpm
sync:i18n` would copy index.js in `dashboard/locale/en` to every other
folder `dashboard/locale/*/`

---------

Co-authored-by: Pranav <pranavrajs@gmail.com>
2025-02-12 17:43:46 -08:00
Pranav
3af7c3b2e7 fix: Move auto resolution message text content to i18n file (#10881)
Move the text content to i18n file.
2025-02-12 16:51:35 -08:00
Chatwoot Bot
1af726e05e chore: Update translations (#10890)
Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
2025-02-12 09:33:19 -08:00
Vishnu Narayanan
1da0474ed1 chore: add gh action to test docker builds against PRs (#10892)
- Add GitHub action to test docker builds for internal/external PR's
- This PR builds the image on both amd64 and arm64 runners for every PR
- This also reduces the build time by 70% (50mins to 15mins)
2025-02-12 17:16:33 +05:30
Vishnu Narayanan
adff853086 feat: docker arm64 builds for ee edition (#10891)
- Publish arm64 docker images for chatwoot ee edition
- Switch to Github actions for `docker` build/publish from docker hub
due to lack of arm64 support


**Note: CE edition arm64 images are already available via
https://github.com/chatwoot/chatwoot/pull/10789**
2025-02-12 16:28:53 +05:30
Sivin Varghese
5adc5c7de6 feat: Adds multiple attachment support for Telegram channel (#10883) 2025-02-12 14:43:58 +05:30
Chatwoot Bot
4a088e0663 chore: Update translations from Crowdin (#10686)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Pranav <pranav@chatwoot.com>
2025-02-12 12:34:34 +05:30
Sivin Varghese
cd80bd07ca fix: TypeError - Cannot read properties of null (reading 'name') (#10887) 2025-02-12 12:31:54 +05:30
Shivam Mishra
b3f616da76 feat: upgrade utils (#10884) 2025-02-12 11:52:01 +05:30
Shivam Mishra
c838779932 feat: Use feature flags across the routes (#10797) 2025-02-11 16:36:20 -08:00
Sivin Varghese
55d41b112b feat: Show shared contact's name in Telegram channel (#10856)
# Pull Request Template

## Description

This PR adds the ability to see the shared contact name in Telegram
channels.

## Type of change

- [x] New feature (non-breaking change which adds functionality)

## How Has This Been Tested?

**Loom video**

https://www.loom.com/share/cd318056ad4d44d4a1fc4b5d4ad38d60?sid=26d833ae-ded9-4cf0-9af7-81eecfa37f19


## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules

---------

Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
2025-02-11 19:39:54 +05:30
Shivam Mishra
a780de4b64 refactor: show deprecation warnings in dev only (#10868)
Fixes: https://github.com/chatwoot/chatwoot/issues/10734
2025-02-11 19:15:46 +05:30
Sivin Varghese
cf025e0fa4 chore: Remove the background SVG from the help center (#10857)
# Pull Request Template

## Description

This PR will remove the hexagon background image from public portal.

Fixes
https://linear.app/chatwoot/issue/CW-4013/remove-the-background-from-the-help-center

## Type of change
- [x] Bug fix (non-breaking change which fixes an issue)

## How Has This Been Tested?

**Screenshots**
**Before**
<img width="1507" alt="image"
src="https://github.com/user-attachments/assets/3539631d-013b-4770-8bfc-643daf695e0d"
/>

<img width="1507" alt="image"
src="https://github.com/user-attachments/assets/8f511a12-7f77-4301-a0db-bb8ef6f0e37f"
/>



**After**
<img width="1507" alt="image"
src="https://github.com/user-attachments/assets/4eb1a072-991c-4632-8c10-c7551def3a24"
/>

<img width="1507" alt="image"
src="https://github.com/user-attachments/assets/555e9f69-317a-4bc9-97aa-0990908729fa"
/>


## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [ ] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules
2025-02-11 18:58:36 +05:30
Shivam Mishra
84822a013a fix: inconsistent reply box cc update (#10799)
This PR target two issues

### CC & BCC not updated correctly

When moving from one conversation to another, the store may not have the
list of all the messages. A fetch is subsequently made to get the
messages. However, this update does not trigger the `currentChat`
watcher. This PR fixes it by adding a new watcher on
`currentChat.messages`.

We also update the `setCCAndToEmailsFromLastChat` method to reset the
`cc`, `bcc` and `to` fields if the last email is not found. This ensures
that the data is not carried forward from a previous email

Fixes: https://github.com/chatwoot/chatwoot/issues/10477

### To address are not added correctly to the `CC`

If the `to` address of a previous email has multiple recipient, there
was no case to add them to the CC.

Fixes: https://github.com/chatwoot/chatwoot/issues/8925

---

Depends on: https://github.com/chatwoot/utils/pull/41
2025-02-11 17:45:59 +05:30
Shivam Mishra
a428dfc3f4 feat: handle mine event for incoming messages (#10867)
Handle `mine` condition, missed in
https://github.com/chatwoot/chatwoot/pull/10529
2025-02-11 17:45:31 +05:30
Pranav
4b12a8a51e chore: Add more conversation events for reload (#10877)
Followup PR for https://github.com/chatwoot/chatwoot/pull/10876. This PR
just adds all the events related to conversation update to be reloaded
before sending it to the UI.
2025-02-11 00:33:45 -08:00
Pranav
3c78d25306 chore: Reload conversation data in ActionCableBroadcastJob before sending (#10876)
During high-traffic periods, events may appear out of order, causing the
conversation job to queue outdated data, which can lead to issues in the
UI. This update ensures that only the latest available data is sent to the UI.

The conversation object is refreshed before sending it to the UI.
2025-02-10 23:16:15 -08:00
Pranav
8faccba052 chore: Update the precision of the updated_at timestamp in conversation model (#10875)
Use to_f instead of to_i to preserve the millisecond precision in the UI.
2025-02-10 20:22:11 -08:00
Pranav
02000de905 chore: Add updated_at attribute to the conversation event (#10873)
This PR adds updated_at attribute to the conversation event.
2025-02-10 19:33:26 -08:00
dependabot[bot]
d7c0507e33 chore(deps): Bump net-imap from 0.4.17 to 0.4.19 (#10871)
Bumps [net-imap](https://github.com/ruby/net-imap) from 0.4.17 to
0.4.19.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/ruby/net-imap/releases">net-imap's
releases</a>.</em></p>
<blockquote>
<h2>v0.4.19</h2>
<h2>What's Changed</h2>
<h3>🔒 Security Fix</h3>
<p>Fixes CVE-2025-25186 (GHSA-7fc5-f82f-cx69): A malicious server can
exhaust client memory by sending <code>APPENDUID</code> or
<code>COPYUID</code> responses with very large <code>uid-set</code>
ranges. <code>Net::IMAP::UIDPlusData</code> expands these ranges into
arrays of integers.</p>
<h4>Fix with minor API changes</h4>
<p>Set <code>config.parser_use_deprecated_uidplus_data</code> to
<code>false</code> to replace <code>UIDPlusData</code> with
<code>AppendUIDData</code> and <code>CopyUIDData</code>. These classes
store their UIDs as <code>Net::IMAP::SequenceSet</code> objects
(<em>not</em> expanded into arrays of integers). Code that does not
handle <code>APPENDUID</code> or <code>COPYUID</code> responses should
not see any difference. Code that does handle these responses
<em>may</em> need to be updated.</p>
<p>For v0.3.8, this option is not available
For v0.4.19, the default value is <code>true</code>.
For v0.5.6, the default value is <code>:up_to_max_size</code>.
For v0.6.0, the only allowed value will be <code>false</code>
<em>(<code>UIDPlusData</code> will be removed from v0.6)</em>.</p>
<h4>Mitigate with backward compatible API</h4>
<p>Adjust <code>config.parser_max_deprecated_uidplus_data_size</code> to
limit the maximum <code>UIDPlusData</code> UID set size.
When <code>config.parser_use_deprecated_uidplus_data == true</code>,
larger sets will crash.
When <code>config.parser_use_deprecated_uidplus_data ==
:up_to_max_size</code>, larger sets will use <code>AppendUIDData</code>
or <code>CopyUIDData</code>.</p>
<p>For v0.3,8, this limit is <em>hard-coded</em> to 10,000.
For v0.4.19, this limit defaults to 1000.
For v0.5.6, this limit defaults to 100.
For v0.6.0, the only allowed value will be <code>0</code>
<em>(<code>UIDPlusData</code> will be removed from v0.6)</em>.</p>
<h4>Please Note: unhandled responses</h4>
<p>If the client does not add response handlers to prune unhandled
responses, a malicious server can still eventually exhaust all client
memory, by repeatedly sending malicious responses. However,
<code>net-imap</code> has always retained unhandled responses, and it
has always been necessary for long-lived connections to prune these
responses. This is not significantly different from connecting to a
trusted server with a long-lived connection. To limit the maximum number
of retained responses, a simple handler might look something like the
following:</p>
<pre lang="ruby"><code>limit = 1000
imap.add_response_handler do |resp|
  next unless resp.respond_to?(:name) &amp;&amp; resp.respond_to?(:data)
  name = resp.name
code = resp.data.code&amp;.name if
resp.data.in?(Net::IMAP::ResponseText)
  imap.responses(name) { _1.slice!(0...-limit) }
  imap.responses(code) { _1.slice!(0...-limit) }
end
</code></pre>
<h3>Added</h3>
<ul>
<li>🔧 ResponseParser config is mutable and non-global (backports <a
href="https://redirect.github.com/ruby/net-imap/issues/381">#381</a>) by
<a href="https://github.com/nevans"><code>@​nevans</code></a> in <a
href="https://redirect.github.com/ruby/net-imap/pull/382">ruby/net-imap#382</a></li>
<li> SequenceSet ordered entries methods (backports to v0.4-stable) by
<a href="https://github.com/nevans"><code>@​nevans</code></a> in <a
href="https://redirect.github.com/ruby/net-imap/pull/402">ruby/net-imap#402</a>
Backports the following:
<ul>
<li> Add SequenceSet methods for querying about duplicates by <a
href="https://github.com/nevans"><code>@​nevans</code></a> in <a
href="https://redirect.github.com/ruby/net-imap/pull/384">ruby/net-imap#384</a></li>
<li> Add <code>SequenceSet#each_ordered_number</code> by <a
href="https://github.com/nevans"><code>@​nevans</code></a> in <a
href="https://redirect.github.com/ruby/net-imap/pull/386">ruby/net-imap#386</a></li>
<li> Add <code>SequenceSet#find_ordered_index</code> by <a
href="https://github.com/nevans"><code>@​nevans</code></a> in <a
href="https://redirect.github.com/ruby/net-imap/pull/396">ruby/net-imap#396</a></li>
<li> Add <code>SequenceSet#ordered_at</code> by <a
href="https://github.com/nevans"><code>@​nevans</code></a> in <a
href="https://redirect.github.com/ruby/net-imap/pull/397">ruby/net-imap#397</a></li>
</ul>
</li>
<li> Backport UIDPlusData, AppendUIDData, CopyUIDData to v0.4 by <a
href="https://github.com/nevans"><code>@​nevans</code></a> in <a
href="https://redirect.github.com/ruby/net-imap/pull/404">ruby/net-imap#404</a>
Backports the following:
<ul>
<li> Add AppendUIDData and CopyUIDData classes by <a
href="https://github.com/nevans"><code>@​nevans</code></a> in <a
href="https://redirect.github.com/ruby/net-imap/pull/400">ruby/net-imap#400</a></li>
</ul>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="4c4ed09997"><code>4c4ed09</code></a>
🔖 Bump version to 0.4.19</li>
<li><a
href="c8c5a64373"><code>c8c5a64</code></a>
Merge commit from fork</li>
<li><a
href="abff00fd70"><code>abff00f</code></a>
🔧 Add <code>:up_to_max_size</code> config for UIDPlusData</li>
<li><a
href="34a1f27a45"><code>34a1f27</code></a>
🔧 Add config option for max UIDPlusData size</li>
<li><a
href="6613d57e8e"><code>6613d57</code></a>
🔒 Limit exponential memory usage to parse uid-set</li>
<li><a
href="e4d57b1e00"><code>e4d57b1</code></a>
🔀 Merge pull request <a
href="https://redirect.github.com/ruby/net-imap/issues/404">#404</a>
from ruby/backport-0.4-uidplus-deprecation</li>
<li><a
href="d32320a749"><code>d32320a</code></a>
🐛 Fix missing <code>Data.define</code> for new classes</li>
<li><a
href="3c592fc98c"><code>3c592fc</code></a>
🔧🗑️ Deprecate UIDPlusData, with config to upgrade</li>
<li><a
href="7e58ef35fa"><code>7e58ef3</code></a>
 Add CopyUIDData (to replace UIDPlusData)</li>
<li><a
href="4c601c3a84"><code>4c601c3</code></a>
 Add AppendUIDData (to replace UIDPlusData)</li>
<li>Additional commits viewable in <a
href="https://github.com/ruby/net-imap/compare/v0.4.17...v0.4.19">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=net-imap&package-manager=bundler&previous-version=0.4.17&new-version=0.4.19)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/chatwoot/chatwoot/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-10 17:35:12 -08:00
Sivin Varghese
e97e68b1ba fix: Message signature is not appending (#10855)
# Pull Request Template

## Description

**Issue:** The message signature wasn't being appended to new email
conversations when a target inbox was selected.

**Solution:** To address this, a reusable `handleSignatureSetup`
function was created to manage the signature logic. The same logic was
applied in both cases, when the inbox selection changed (using `watch`)
and during the initial load (using `mounted`).

Fixes
https://linear.app/chatwoot/issue/CW-4005/allow-to-activate-the-message-signature-for-new-email-conversations-by
https://github.com/chatwoot/chatwoot/issues/10836

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)

## How Has This Been Tested?

**Steps to reproduce**:
https://github.com/chatwoot/chatwoot/issues/10836#issuecomment-2637354304

### Loom video

**Before**

https://www.loom.com/share/ccf597cfa8d94d0eaff1222102901d2c?sid=abfea42b-425e-446e-8e92-99359b786607

**After**

https://www.loom.com/share/d9deddfcf8de48ab87e31911dfb774d8?sid=c1aac19b-b243-428e-9a9f-2ad9f4efe49c


## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules
2025-02-07 16:28:27 +05:30
Shivam Mishra
be1999e7f8 fix: re-rendering of components when shifting from the unread list to the read list (#10835)
Fixes https://github.com/chatwoot/chatwoot/issues/10812

Demo


https://github.com/user-attachments/assets/a0f7eb64-8f6e-4992-a163-c972e85fb205

---------

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2025-02-07 08:54:25 +05:30
Vishnu Narayanan
c3601e16cf chore: bump up cwctl version to 3.2.0 (#10850) 2025-02-06 17:44:18 +05:30
Sivin Varghese
dc728faafb feat: Adds support for telegram contact sharing (#10841)
# Pull Request Template

## Description

This PR adds support for displaying shared contacts in a Telegram
channel.

**NB:** Tested with both old and new bubbles. 
Multiple numbers for a single contact are not supported at this time,
but multiple contacts are supported.
In the future, we can add support for displaying contact names as well.

## Type of change

- [x] New feature (non-breaking change which adds functionality)

## How Has This Been Tested?

**Loom video**

https://www.loom.com/share/95efadace3194887bc0663c53e7c08bc?sid=a5c27176-3dd8-456c-80b9-c63dbb89dca1


## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [ ] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules
2025-02-06 14:23:08 +05:30
Baptiste Fontaine
2a365bf19e feat: show email subject in conversation search results (#10843)
# Pull Request Template

## Description

This addresses #10842. It exposes `additional_attributes` in the
conversations search endpoint, uses it in
`SearchResultConversationsList` to pass
`conversation.additional_attributes?.mail_subject` down to
`SearchResultConversationItem`, which in turn displays it.

Fixes #10842

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality not to work as expected)
- [ ] This change requires a documentation update

## How Has This Been Tested?

I have tested this locally by searching for conversations. See this
screenshot where I searched for "noreply":
![Screenshot from 2025-02-05
11-04-54](https://github.com/user-attachments/assets/689e3e99-c20b-48a7-9c3e-35d45ffeafc1)

I would love to add automated tests but I’m not sure how to do that.

## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream
modules

---------

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: iamsivin <iamsivin@gmail.com>
2025-02-06 10:38:57 +05:30
Baptiste Fontaine
d5ecbba71f fix: onboarding/index.html.erb unclosed HTML tags (#10838)
# Pull Request Template

## Description

This was not really an issue because HTML is permissive and auto-closes
these when the parent is closed, but it’s cleaner to do it.
It was also showing errors if you open the project in an IDE.

## Type of change

- Chore

## How Has This Been Tested?

## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented on my code, particularly in hard-to-understand
areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream
modules

Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
2025-02-06 09:43:38 +05:30
Sivin Varghese
abcff9883f feat: Order previous conversations by last activity (#10825) 2025-02-05 19:50:25 -08:00
Shivam Mishra
d463a5cc30 fix: incorrect sender name on email meta (#10837)
Fixes https://github.com/chatwoot/chatwoot/issues/10807
2025-02-06 08:52:02 +05:30
dependabot[bot]
c750413094 chore(deps): Bump vitest from 2.0.1 to 3.0.5 (#10839)
Bumps
[vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest)
from 2.0.1 to 3.0.5

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pranav <pranav@chatwoot.com>
Co-authored-by: Pranav <pranavrajs@gmail.com>
2025-02-05 12:48:27 -08:00
Shivam Mishra
f2a7e1da6b fix: Corepack pnpm issue (#10840)
So, a while back Circle CI builds and Heroku builds started to fail. 

From all the threads I read, it seems like the [npm registry rotated
it's signing
keys](https://github.com/pnpm/pnpm/issues/9014#issuecomment-2616589753)
New pnpm versions were signed with the new key. Corepack, however,
bundles a static set of trusted keys (from Node’s release), so it
continued verifying signatures only against the old key. When it
encountered packages signed with the new key, Corepack’s integrity check
failed with “Cannot find matching keyid” errors.This mismatch caused
Corepack’s integrity check to fail with “Cannot find matching keyid”
errors.

Workarounds include the following

1. Updating Corepack (to 0.31.0), they [upgraded their
package](https://github.com/nodejs/corepack/releases/tag/v0.31.0) to
include the new integrity check keys. But we seldom control what's going
on with the CI, also, updating this across our scripts is going to be a
painful task. Besides Heroku has [made some
fixes](https://github.com/heroku/buildpacks-nodejs/pull/1010) around
this
2. Disabling integrity checks 🔥 #YOLO
3. Pinning `pnpm` to older versions, or pinning it to a newer version
with the checksum in place.

Doing the third one here, running `corepack use pnpm@9.15.5` fixes this,
[ref](https://github.com/pnpm/pnpm/issues/9014#issuecomment-2623761494)

We can get rid of this over time as CDN caches used by build systems are
refreshed. But the change in this PR is not disruptive in anyway, only
rigidly secure.

Fixes: https://github.com/chatwoot/chatwoot/issues/10832

---

Here are the threads to follow 

- https://github.com/pnpm/pnpm/issues/9014
- https://github.com/pnpm/pnpm/issues/9029
- https://github.com/nodejs/corepack/issues/612
- https://github.com/nodejs/corepack/issues/616
- https://github.com/heroku/buildpacks-nodejs/pull/1010

---------

Co-authored-by: Vishnu Narayanan <vishnu@chatwoot.com>
2025-02-05 10:12:29 -08:00
dependabot[bot]
41c7683e04 chore(deps-dev): bump vite from 5.4.8 to 5.4.12 (#10744)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite)
from 5.4.8 to 5.4.12.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vitejs/vite/releases">vite's
releases</a>.</em></p>
<blockquote>
<h2>v5.4.12</h2>
<p>This version contains a breaking change due to security fixes. See <a
href="https://github.com/vitejs/vite/security/advisories/GHSA-vg6x-rcgg-rjx6">https://github.com/vitejs/vite/security/advisories/GHSA-vg6x-rcgg-rjx6</a>
for more details.</p>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v5.4.12/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v5.4.11</h2>
<p>Please refer to <a
href="ecd2375460/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v5.4.10</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v5.4.10/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v5.4.9</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v5.4.9/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/vitejs/vite/blob/v5.4.12/packages/vite/CHANGELOG.md">vite's
changelog</a>.</em></p>
<blockquote>
<h2><!-- raw HTML omitted -->5.4.12 (2025-01-20)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix!: check host header to prevent DNS rebinding attacks and
introduce <code>server.allowedHosts</code> (<a
href="9da4abc8dd">9da4abc</a>)</li>
<li>fix!: default <code>server.cors: false</code> to disallow fetching
from untrusted origins (<a
href="dfea38f1ff">dfea38f</a>)</li>
<li>fix: verify token for HMR WebSocket connection (<a
href="b71a5c89a1">b71a5c8</a>)</li>
<li>chore: add deps update changelog (<a
href="ecd2375460">ecd2375</a>)</li>
</ul>
<h2><!-- raw HTML omitted -->5.4.11 (2024-11-11)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix(deps): update dependencies of postcss-modules (<a
href="ceb15db613">ceb15db</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/18617">#18617</a></li>
</ul>
<h2><!-- raw HTML omitted -->5.4.10 (2024-10-23)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: backport <a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/18367">#18367</a>,augment
hash for CSS files to prevent chromium erroring by loading previous fil
(<a
href="7d1a3bcc43">7d1a3bc</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/18367">#18367</a>
<a
href="https://redirect.github.com/vitejs/vite/issues/18412">#18412</a></li>
</ul>
<h2><!-- raw HTML omitted -->5.4.9 (2024-10-14)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: bump launch-editor-middleware to v2.9.1 (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/18348">#18348</a>)
(<a
href="508d9ab834">508d9ab</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/18348">#18348</a></li>
<li>fix(css): fix lightningcss dep url resolution with custom root (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/18125">#18125</a>)
(<a
href="eae00b561e">eae00b5</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/18125">#18125</a></li>
<li>fix(data-uri): only match ids starting with <code>data:</code> (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/18241">#18241</a>)
(<a
href="96084d6e75">96084d6</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/18241">#18241</a></li>
<li>fix(deps): bump tsconfck (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/18322">#18322</a>)
(<a
href="dc5434ce87">dc5434c</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/18322">#18322</a></li>
<li>fix(hmr): don't try to rewrite imports for direct CSS soft
invalidation (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/18252">#18252</a>)
(<a
href="851b258c34">851b258</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/18252">#18252</a></li>
<li>fix(ssr): (backport <a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/18150">#18150</a>)
fix source map remapping with multiple sources (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/18204">#18204</a>)
(<a
href="262a8796d4">262a879</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/18204">#18204</a></li>
<li>chore: update all url references of vitejs.dev to vite.dev (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/18276">#18276</a>)
(<a
href="c23558a7af">c23558a</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/18276">#18276</a></li>
<li>chore: update license copyright (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/18278">#18278</a>)
(<a
href="1864eb17b2">1864eb1</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/18278">#18278</a></li>
<li>docs: update homepage (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/18274">#18274</a>)
(<a
href="ae4416349e">ae44163</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/18274">#18274</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f428aa9af8"><code>f428aa9</code></a>
release: v5.4.12</li>
<li><a
href="9da4abc8dd"><code>9da4abc</code></a>
fix!: check host header to prevent DNS rebinding attacks and introduce
`serve...</li>
<li><a
href="b71a5c89a1"><code>b71a5c8</code></a>
fix: verify token for HMR WebSocket connection</li>
<li><a
href="dfea38f1ff"><code>dfea38f</code></a>
fix!: default <code>server.cors: false</code> to disallow fetching from
untrusted origins</li>
<li><a
href="ecd2375460"><code>ecd2375</code></a>
chore: add deps update changelog</li>
<li><a
href="c54c860f9d"><code>c54c860</code></a>
release: v5.4.11</li>
<li><a
href="5f52bc8b9e"><code>5f52bc8</code></a>
release: v5.4.10</li>
<li><a
href="7d1a3bcc43"><code>7d1a3bc</code></a>
fix: backport <a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/18367">#18367</a>,augment
hash for CSS files to prevent chromium erroring ...</li>
<li><a
href="898d61f94b"><code>898d61f</code></a>
release: v5.4.9</li>
<li><a
href="508d9ab834"><code>508d9ab</code></a>
fix: bump launch-editor-middleware to v2.9.1 (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/18348">#18348</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/vitejs/vite/commits/v5.4.12/packages/vite">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=vite&package-manager=npm_and_yarn&previous-version=5.4.8&new-version=5.4.12)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/chatwoot/chatwoot/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-04 18:13:48 -08:00
Pranav
1b1ba3f8dd fix: Update the photo/video caption when an update event is received (#10804)
The update ensures proper handling of text updates in photo/video
messages by accounting for the caption attribute in addition to the text
attribute. This change enables consistent processing across both
messages.

Fixes https://github.com/chatwoot/chatwoot/issues/10760

Note: TIL, you can update the video/photo you’ve sent on Telegram, not
just the text. Currently, we’re not handling this. To support it, we
need to parse the payload and update the attachments accordingly. This
could be taken as a followup.
2025-02-03 12:44:10 -08:00
Sivin Varghese
bd94e5062d chore: Search improvements (#10801)
- Adds pagination support for search.
- Use composition API on all search related component.
- Minor UI improvements.
- Adds missing specs

Loom video
https://www.loom.com/share/5b01afa5c9204e7d97ff81b215621dde?sid=82ca6d22-ca8c-4d5e-8740-ba06ca4051ba
2025-02-03 19:34:50 +05:30
Sojan Jose
3fb77fe806 chore: Resolve flaky spec for Contact country sorting (#10810)
We have been encountering errors in the community pipeline for the
contacts sort by country spec. Upon investigation, it was discovered
that the spec assumes the country code is used for sorting. However, the
sorting actually relies on the country attribute.

The payload from a previous spec run indicates that none of the contact
objects include the country attribute. This fix addresses the issue by
aligning the spec with the actual implementation logic.

Here’s an example payload from the previous spec run for reference:
<img width="1063" alt="Screenshot 2025-01-31 at 6 17 44 PM"
src="https://github.com/user-attachments/assets/df9b26e8-c5d0-432a-9d2a-16f76cb66967"
/>
2025-02-03 16:54:13 +05:30
Pranav
c7d259d5fd chore: Update the behavior of Captain resolutions (#10794)
This PR ensures that only conversations from quick conversation channels
are resolved, avoiding resolutions on the email channel (we still need
to improve the UX here). It also updates the FAQ generation logic,
limiting it to conversations that had at least one human interaction.
2025-02-03 16:25:08 +05:30
Sivin Varghese
5905b5301d fix: Prevent compose modal from closing when creating a link (#10809) 2025-02-03 15:08:20 +05:30
Sivin Varghese
c18452f6b6 chore: Use getFileInfo helper from utils (#10819)
# Pull Request Template

## Description
The PR includes the usage of `getFileInfo` helper from utils
https://github.com/chatwoot/utils/pull/40.

Fixes
https://github.com/chatwoot/chatwoot/pull/10806#discussion_r1937797905

## How Has This Been Tested?

**Screenshot**
<img width="490" alt="image"
src="https://github.com/user-attachments/assets/f0788e89-b670-47da-b0ca-3765eb424be0"
/>



## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [ ] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules
2025-02-03 14:13:01 +05:30
Evans
c403f6872c docs: Update copyright year to 2025 (#10817)
Update copyright year to 2025

# Pull Request Template

## Description

This PR updates the copyright year in the README

## Type of change

Please delete options that are not relevant.

## How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration.


## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented on my code, particularly in hard-to-understand
areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules
2025-02-01 19:44:57 +05:30
Sivin Varghese
70919d184d fix: Update min-length validation for the contact to support names with single characters (#10813)
This PR updates the contact form validation to allow a minimum length of one character for the first name.

Fixes
https://linear.app/chatwoot/issue/CW-3993/update-the-validation-on-contact-form-to-support-just-one-character

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)

## How Has This Been Tested?



https://github.com/user-attachments/assets/2b95af80-ee70-4f4b-8d0d-b01779db9d94




## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [ ] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules
2025-01-31 14:39:32 -08:00
Sivin Varghese
24257f9771 chore: Always display the extension of an attached file (#10806) 2025-01-31 18:28:28 +05:30
Sivin Varghese
c3aab44b5f feat: Add unread badge to sidebar for inbox view (#10803)
# Pull Request Template

## Description

This PR adds a badge to the icon in the sidebar group header and an
unread highlight for the inbox view.

## Type of change

- [x] New feature (non-breaking change which adds functionality)

## How Has This Been Tested?

**Loom video**

https://www.loom.com/share/1a880aa16de249a1836b8d014325c067?sid=87cc7b64-667b-4066-8993-d33abccf7b67


## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules
2025-01-31 15:14:10 +05:30
Shivam Mishra
b811c27ab5 feat: Hide empty folders from sidebar (#10786)
This PR updates the sidebar to hide empty folders. So, in case the user
has not created any folders, or teams, the section in the sidebar will
be hidden
2025-01-30 17:03:12 -08:00
Vishnu Narayanan
55f1690d9e fix: docker github action for ce images (#10800)
- Fix the docker tag issue during push stage for ce image build
2025-01-30 15:52:01 +05:30
Sivin Varghese
2c75ccb004 feat: Ability to rearrange attributes in sidebar (#10784) 2025-01-30 15:24:02 +05:30
Shivam Mishra
d997734837 revert: Next bubble improvements (#10795) 2025-01-29 20:04:45 -08:00
Sivin Varghese
2c1a8e59f5 chore: Next bubble improvements (#10759) 2025-01-29 22:56:08 +05:30
Vishnu Narayanan
f6d87d0e6e feat: switch to native arm64 runners for docker ce images (#10789)
Emulated docker arm64 builds are failing for community images. This PR

- Switches gh action to use native arm64 runners
- Merges amd64 and arm64 images to create a multi-arch docker image

Fixes https://github.com/chatwoot/chatwoot/issues/10790
2025-01-29 22:53:29 +05:30
Vishnu Narayanan
56874c442c feat: add OOMPolicy for sidekiq systemd service (#10772)
- Add OOM policy for `sidekiq` `systemd` service
- This ensures `sidekiq` does not consume all the memory available in
the system
2025-01-29 17:27:58 +05:30
Sivin Varghese
eb908d9c03 fix: Download file CORS issue (#10787)
# Pull Request Template

## Description
Ref: https://github.com/chatwoot/utils/pull/39

---------

Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
2025-01-29 15:32:13 +05:30
Shivam Mishra
5ccae73f8a fix: Update captain billing colors (#10782) 2025-01-28 13:50:50 -08:00