开源即时聊天、电子邮件支持、全方位服务台。可替代 Intercom、Zendesk、Salesforce Service Cloud 等。🔥💬
Go to file
Pranav 8cdbdaaa07
fix: Process attachments as regular attachments if the text/plain or text/html part is empty (#10379)
Some email clients automatically set Content-Disposition to inline for
specific content types, such as images. In cases where the email body is
empty, inline attachments may not display correctly due to our previous
implementation. Our assumption was that these attachments are referenced
within text/plain or text/html parts.

Customer-reported issues, especially with Apple Mail, show emails with
attachments marked as inline but without any corresponding text parts.
This leads to missing attachments even though would have processed the
attachment.

This update introduces a check for the presence of a text part. If none
exists, inline attachments are treated as regular attachments and added
to the external attachments array, ensuring that all attachments display
properly.

<details>
<summary><b>Script to update the existing emails that are already
available in the system</b></summary>

```rb
def update_content id
  message = Message.find id
  conversation = message.conversation
  message_id = message.source_id

  channel = message.inbox.channel

  authentication_type = 'XOAUTH2'
  imap_password = Google::RefreshOauthTokenService.new(channel: channel).access_token
  imap = Net::IMAP.new(channel.imap_address, port: channel.imap_port, ssl: true)
  imap.authenticate(authentication_type, channel.imap_login, imap_password)
  imap.select('INBOX')

  results = imap.search(['HEADER', 'MESSAGE-ID', message_id])
  message_content = imap.fetch(results.first, 'RFC822').first.attr['RFC822']
  mail = MailPresenter.new(Mail.read_from_string(message_content))

  mail_content = if mail.text_content.present?
                   mail.text_content[:reply]
                 elsif mail.html_content.present?
                   mail.html_content[:reply]
                 end

  attachments = mail.attachments.last(Message::NUMBER_OF_PERMITTED_ATTACHMENTS)
  inline_attachments = attachments.select { |attachment| attachment[:original].inline? && mail_content.present? }
  regular_attachments = attachments - inline_attachments

  regular_attachments.each do |mail_attachment|
    attachment = message.attachments.new(
      account_id: conversation.account_id,
      file_type: 'file'
    )
    attachment.file.attach(mail_attachment[:blob])
  end

  message.save!
end
```
</details>
2024-11-04 10:25:01 +01:00
__mocks__ Feature: Agent Profile Update with avatar (#449) 2020-02-16 17:20:38 +05:30
.circleci chore: fix circleci on vite build (#10214) 2024-10-07 15:27:41 +05:30
.dependabot Add Dependabot config (#217) 2019-11-25 09:48:11 +05:30
.devcontainer chore: Upgrade ruby to 3.3.3 (#9664) 2024-07-05 12:20:07 +05:30
.github chore: fix circleci on vite build (#10214) 2024-10-07 15:27:41 +05:30
.husky feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
.vscode feat: Add the option for consent form (#6511) 2023-02-28 13:57:05 +05:30
app fix: Process attachments as regular attachments if the text/plain or text/html part is empty (#10379) 2024-11-04 10:25:01 +01:00
bin feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
clevercloud feat: Add support for Clever cloud deployments (#1703) 2021-01-29 17:08:40 +05:30
config feat: Add new sidebar for Chatwoot V4 (#10291) 2024-10-23 18:32:37 -07:00
db fix: Include uncategorized articles in the all article section to allow edit/delete (#10153) 2024-09-23 23:39:03 -07:00
deployment fix: cwctl upgrade in ubuntu 24.04 (#10305) 2024-10-17 09:46:22 +05:30
docker chore: force pnpm install in vite docker (#10367) 2024-10-29 17:13:17 +05:30
enterprise Bump version to 3.13.0 2024-09-17 16:46:02 -07:00
lib fix: ip-lookup database lazy loading for all environments (#8052) 2024-10-22 23:18:30 -07:00
log Initial Commit 2019-08-14 15:18:44 +05:30
public feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
rubocop fix: Add custom rubocop rules for email fetch (#8987) 2024-02-23 11:58:02 -08:00
spec fix: Process attachments as regular attachments if the text/plain or text/html part is empty (#10379) 2024-11-04 10:25:01 +01:00
swagger feat: Conversation update API for sla_policy_id (#8973) 2024-03-14 17:22:32 +05:30
theme feat: new colors (#10352) 2024-10-28 14:27:08 +05:30
tmp Initial Commit 2019-08-14 15:18:44 +05:30
vendor feat: Sentiment model download and upload to vendor (#7526) 2023-07-18 12:17:50 +05:30
.all-contributorsrc [docs] Move contributors section to docs (#120) 2019-10-06 09:23:24 +05:30
.browserslistrc Initial Commit 2019-08-14 15:18:44 +05:30
.bundler-audit.yml chore: mitigate CVE-2021-41098 (#3101) 2021-09-28 19:34:11 +05:30
.codeclimate.yml chore: fix circleci on vite build (#10214) 2024-10-07 15:27:41 +05:30
.dockerignore chore: add build id to settings page (#6873) 2023-04-18 00:35:35 +05:30
.editorconfig fix: Update .editorconfig to fix spaces and indent_style (#5612) 2022-10-12 14:00:42 -07:00
.env.example feat: Generate SSO URL in Chatwoot, move Captain to primary tab (#9871) 2024-08-01 19:22:34 -07:00
.eslintrc.js feat: Add the design for the new tab component (#10261) 2024-10-11 15:27:29 -07:00
.gitignore feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
.nvmrc chore: Upgrade Node.js to v20 (#7759) 2023-08-28 19:20:35 +05:30
.prettierrc chore: Execute campaigns based on matching URL (#2254) 2021-05-17 21:38:35 +05:30
.rspec Fix url in emails, add frontendURL helper (#19) 2019-08-25 19:59:28 +05:30
.rubocop.yml fix: Add custom rubocop rules for email fetch (#8987) 2024-02-23 11:58:02 -08:00
.ruby-version chore: Upgrade ruby to 3.3.3 (#9664) 2024-07-05 12:20:07 +05:30
.scss-lint.yml fix: Add a check for 24 hour window before sending a message (#1084) 2020-07-25 22:54:45 +05:30
.slugignore chore: Upgrade to Rails 7 (#6719) 2023-05-06 10:44:52 +05:30
app.json feat: Switch Heroku Postgres basic to essential-0 (#9452) 2024-05-10 09:52:04 -07:00
Capfile 🚨Fix Rubocop lint errors 2019-10-20 14:17:26 +05:30
CODE_OF_CONDUCT.md General updates and add CODEOWNERS (#3685) 2022-01-05 12:37:22 +05:30
config.ru Initial Commit 2019-08-14 15:18:44 +05:30
CONTRIBUTING.md General updates and add CODEOWNERS (#3685) 2022-01-05 12:37:22 +05:30
crowdin.yml chore: Update Crowdin Config (#7375) 2023-06-23 23:02:55 +05:30
docker-compose.production.yaml fix: add restart policy for rails/sidekiq containers (#9797) 2024-07-18 18:33:03 +05:30
docker-compose.test.yaml Chore: modify docker-compose for prod and local setups (#1090) 2020-07-24 23:34:09 +05:30
docker-compose.yaml fix: pnpm in vite docker (#10344) 2024-10-29 15:16:10 +05:30
Gemfile feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
Gemfile.lock chore(deps): bump rexml from 3.3.6 to 3.3.9 (#10361) 2024-10-28 20:42:11 -07:00
histoire.config.ts feat: Add histoire for component playground (#10256) 2024-10-09 22:10:53 -07:00
LICENSE chore: Update year in LICENSE (#8835) 2024-02-01 15:37:05 +05:30
Makefile fix: Use pnpm in make setup command (#10289) 2024-10-15 12:57:29 -07:00
package.json feat: Update button component (#10362) 2024-10-29 14:00:24 +05:30
pnpm-lock.yaml feat: Update button component (#10362) 2024-10-29 14:00:24 +05:30
postcss.config.js feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
Procfile chore: add build id to settings page (#6873) 2023-04-18 00:35:35 +05:30
Procfile.dev feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
Procfile.test feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
Rakefile Initial Commit 2019-08-14 15:18:44 +05:30
README.md feat: Upgrade vite to 5.4.8 to fix dependabot/186 (#10196) 2024-10-02 00:57:37 -07:00
SECURITY.md chore: Update security guidelines (#5382) 2022-09-02 16:59:38 +05:30
semantic.yml Chore: Update copy on Signup page (#1023) 2020-07-09 16:28:09 +05:30
tailwind.config.js feat: Update button component (#10362) 2024-10-29 14:00:24 +05:30
VERSION_CW feat: support vite build for linux installations(cwctl) (#10231) 2024-10-04 16:50:44 +05:30
VERSION_CWCTL feat: support vite build for linux installations(cwctl) (#10231) 2024-10-04 16:50:44 +05:30
vite.config.ts feat: Add new sidebar for Chatwoot V4 (#10291) 2024-10-23 18:32:37 -07:00
vitest.setup.js chore: fix circleci on vite build (#10214) 2024-10-07 15:27:41 +05:30
workbox-config.js [Feature] Add PWA support (#157) 2019-10-18 12:37:09 +05:30

🚨 Note: This branch is unstable. For the stable branch's source code, please use the branch 3.x

Chat dashboard dark mode Chat dashboard

Chatwoot

Customer engagement suite, an open-source alternative to Intercom, Zendesk, Salesforce Service Cloud etc.

Deploy Deploy to DO

Maintainability CircleCI Badge Docker Pull Badge Docker Build Badge Commits-per-month Discord uptime response time Artifact HUB

Chat dashboard dark mode Chat dashboard

Chatwoot is an open-source, self-hosted customer engagement suite. Chatwoot lets you view and manage your customer data, communicate with them irrespective of which medium they use, and re-engage them based on their profile.

Features

Chatwoot supports the following conversation channels:

  • Website: Talk to your customers using our live chat widget and make use of our SDK to identify a user and provide contextual support.
  • Facebook: Connect your Facebook pages and start replying to the direct messages to your page.
  • Instagram: Connect your Instagram profile and start replying to the direct messages.
  • Twitter: Connect your Twitter profiles and reply to direct messages or the tweets where you are mentioned.
  • Telegram: Connect your Telegram bot and reply to your customers right from a single dashboard.
  • WhatsApp: Connect your WhatsApp business account and manage the conversation in Chatwoot.
  • Line: Connect your Line account and manage the conversations in Chatwoot.
  • SMS: Connect your Twilio SMS account and reply to the SMS queries in Chatwoot.
  • API Channel: Build custom communication channels using our API channel.
  • Email: Forward all your email queries to Chatwoot and view it in our integrated dashboard.

And more.

Other features include:

  • CRM: Save all your customer information right inside Chatwoot, use contact notes to log emails, phone calls, or meeting notes.
  • Custom Attributes: Define custom attribute attributes to store information about a contact or a conversation and extend the product to match your workflow.
  • Shared multi-brand inboxes: Manage multiple brands or pages using a shared inbox.
  • Private notes: Use @mentions and private notes to communicate internally about a conversation.
  • Canned responses (Saved replies): Improve the response rate by adding saved replies for frequently asked questions.
  • Conversation Labels: Use conversation labels to create custom workflows.
  • Auto assignment: Chatwoot intelligently assigns a ticket to the agents who have access to the inbox depending on their availability and load.
  • Conversation continuity: If the user has provided an email address through the chat widget, Chatwoot will send an email to the customer under the agent name so that the user can continue the conversation over the email.
  • Multi-lingual support: Chatwoot supports 10+ languages.
  • Powerful API & Webhooks: Extend the capability of the software using Chatwoots webhooks and APIs.
  • Integrations: Chatwoot natively integrates with Slack right now. Manage your conversations in Slack without logging into the dashboard.

Documentation

Detailed documentation is available at chatwoot.com/help-center.

Translation process

The translation process for Chatwoot web and mobile app is managed at https://translate.chatwoot.com using Crowdin. Please read the translation guide for contributing to Chatwoot.

Branching model

We use the git-flow branching model. The base branch is develop. If you are looking for a stable version, please use the master or tags labelled as v1.x.x.

Deployment

Heroku one-click deploy

Deploying Chatwoot to Heroku is a breeze. It's as simple as clicking this button:

Deploy

Follow this link to understand setting the correct environment variables for the app to work with all the features. There might be breakages if you do not set the relevant environment variables.

DigitalOcean 1-Click Kubernetes deployment

Chatwoot now supports 1-Click deployment to DigitalOcean as a kubernetes app.

Deploy to DO

Other deployment options

For other supported options, checkout our deployment page.

Security

Looking to report a vulnerability? Please refer our SECURITY.md file.

Community? Questions? Support ?

If you need help or just want to hang out, come, say hi on our Discord server.

Contributors

Thanks goes to all these wonderful people:

Chatwoot © 2017-2024, Chatwoot Inc - Released under the MIT License.