Commit Graph

124 Commits

Author SHA1 Message Date
Muhsin Keloth
44fab70048 feat: Add support for grouped file uploads in Slack (#12454)
Fixes
https://linear.app/chatwoot/issue/CW-5646/add-support-for-grouped-file-uploads-in-slack

Previously, when sending multiple attachments to Slack, we uploaded them
one by one. For example, sending 5 images would result in 5 separate
Slack messages. This created clutter and a poor user experience, since
Slack displayed each file as an individual message.
This PR updates the implementation to group all attachments from a
message and send them as a single Slack message. As a result,
attachments now appear together in one grouped block, providing a much
cleaner and more intuitive experience for users.

**Before:** 
Each file uploaded as a separate Slack message.
<img width="400" height="800" alt="before"
src="https://github.com/user-attachments/assets/c8c7f666-549b-428f-bd19-c94e39ed2513"
/>

**After:** 
All files from a single message grouped and displayed together in one
Slack message (similar to how Slack natively handles grouped uploads).
<img width="400" height="800" alt="after"
src="https://github.com/user-attachments/assets/0b1f22d5-4d37-4b84-905a-15e742317e72"
/>

**Changes**

- Upgraded Slack file upload implementation to use the new multiple
attachments API available in slack-ruby-client `v2.7.0`.
- Updated attachment handling to upload all files from a message in a
single API call.
- Enabled proper attachment grouping in Slack, ensuring related files
are presented together.
2025-09-24 11:31:06 +05:30
Shivam Mishra
75c57ad039 feat: use captain endpoint config in legacy OpenAI base service (#12060)
This PR migrates the legacy OpenAI integration (where users provide
their own API keys) from using hardcoded `https://api.openai.com`
endpoints to use the configurable `CAPTAIN_OPEN_AI_ENDPOINT` from the
captain configuration. This ensures consistency across all OpenAI
integrations in the platform.

## Changes

- Updated `lib/integrations/openai_base_service.rb` to use captain
endpoint config
- Updated `enterprise/app/models/enterprise/concerns/article.rb` to use
captain endpoint config
- Removed unused `enterprise/lib/chat_gpt.rb` class
- Added tests for endpoint configuration behavior
2025-07-30 08:58:27 +04:00
Muhsin Keloth
99ec18c95b feat: Add support for multiple attachments in Slack (#11958) 2025-07-17 09:38:46 +05:30
Muhsin Keloth
01acbe3cda feat: Add user attribution to Linear integration with actor authorization (#11774)
- Add `actor=app` parameter to Linear OAuth authorization URL for
consistent app-level authorization
https://linear.app/developers/oauth-actor-authorization
- Implement user attribution for Linear issue creation and linking using
`createAsUser` and `displayIconUrl` parameters
- Enhance Linear integration to properly attribute actions to specific
Chatwoot agents

**Note**
- The displayIconUrl parameter is being sent correctly to Linear's
GraphQL API (verified through testing), but there is an issues with icon
is not attaching properly.
- We might need to disconnect the integration connect again.
2025-07-01 16:49:26 +05:30
Muhsin Keloth
f4381e3b5d feat: Add activity messages for linear actions (#11654) 2025-06-13 11:57:11 +05:30
Sojan Jose
10363e77ad chore: Add region option to Dialogflow integration (#11510)
## Summary
- support region option when configuring Dialogflow integration
- connect to region endpoint when set
- use session identification based on the region

Fixes: https://github.com/chatwoot/chatwoot/issues/4129
2025-06-05 20:01:17 -05:00
Shivam Mishra
443214e9a0 feat: add support for bunny CDN videos (#11601)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2025-05-28 13:50:43 +05:30
Shivam Mishra
a3bf753f4c feat: add embed for wistia (#11547)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-22 19:09:03 +05:30
Sivin Varghese
ccb3672ff8 fix: Status not updating when creating a Linear issue (#11523) 2025-05-20 16:04:56 +05:30
Sojan Jose
630826baed feat: Implement UI for Agent Bots in settings and remove CSML support (#11276)
- Add agent bots management UI in settings with avatar upload
- Enable agent bot configuration for all inbox types
- Implement proper CRUD operations with webhook URL support
- Fix agent bots menu item visibility in settings sidebar
- Remove all CSML-related code and features
- Add migration to convert existing CSML bots to webhook bots
- Simplify agent bot model and services to focus on webhook bots
- Improve UI to differentiate between system bots and account bots

## Video 





https://github.com/user-attachments/assets/3f4edbb7-b758-468c-8dd6-a9537b983f7d

---------

Co-authored-by: iamsivin <iamsivin@gmail.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Pranav <pranav@chatwoot.com>
2025-04-16 18:02:49 +05:30
Shivam Mishra
5c05e45206 feat: use nocookie version of youtube & vimeo for help center embeds (#11061)
This pull request includes changes to the `CustomMarkdownRenderer` class
and its corresponding tests to support YouTube's "nocookie"
[[ref](https://support.google.com/youtube/answer/171780?hl=en#zippy=%2Cturn-on-privacy-enhanced-mode)]
URLs and adding the `dnt` param to Vimeo embed
[[ref](https://help.vimeo.com/hc/en-us/articles/12426260232977-About-Player-parameters)].

![CleanShot 2025-03-11 at 19 39
36@2x](https://github.com/user-attachments/assets/e7a3e9b1-35a6-4c8c-bdc2-005f773b3d04)

---------

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2025-03-12 10:32:25 +05:30
Muhsin Keloth
a0cf25ccde chore: Rescue slack link unfurling errors. (#11033)
Fixes
https://linear.app/chatwoot/issue/CW-4122/slackwebapierrorsmissingscope-missing-scope

This PR adds the ability to handle errors when scopes are missing during
link unfurling. Since link unfurling is just a nice-to-have feature that
doesn't affect core functionality, we will silently ignore these errors.

---------

Co-authored-by: Sojan <sojan@pepalo.com>
2025-03-06 15:57:16 -08:00
Muhsin Keloth
12134f9391 feat: Linear OAuth 2.0 (#10851)
Fixes https://linear.app/chatwoot/issue/CW-3417/oauth-20-authentication
We are planning to publish the Chatwoot app in the Linear [integration
list](https://linear.app/docs/integration-directory). While we currently
use token-based authentication, Linear recommends OAuth2 authentication.
This PR implements OAuth2 support.

---------

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
2025-02-27 18:15:53 +05:30
Tarush Nagpal
11a7414dc0 feat: Upgrade Dyte apis to v2 (#10706)
# Pull Request Template

## Description

Dyte V1 API's are soon going to be deprecated, hence making sure we
update Chatwoot before that happens

Fixes #10704

## Type of change

Please delete options that are not relevant.

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

## How Has This Been Tested?

1. Open a new or existing conversation from the inbox
2. Press the video call icon on the message composer
3. Verify that the message dialog shows up with the join video call
button
4. Verify that clicking on join call does join the call

## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] My changes generate no new warnings
- [ ] New and existing unit tests pass locally with my changes (Unable
to run this locally)

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2025-02-19 14:47:48 -08:00
Muhsin Keloth
031199f15a chore: Slack file upload changes (#10903)
The Slack `files.upload` API endpoint is deprecated and will stop
functioning on March 11, 2025. In this PR, we have implemented the
changes for the [new file
upload](https://api.slack.com/messaging/files#uploading_files) method.
2025-02-18 22:44:30 -08:00
Sivin Varghese
932244a1ec feat: Add support for Arcade videos on articles (#10585)
Fixes
https://linear.app/chatwoot/issue/CW-3779/add-support-for-arcade-videos-on-articles-loom-alternative

**Loom video**

https://www.loom.com/share/917bdecb4eaf4d3f9782b4fa84ee4bd4?sid=d11f0d71-0cf5-424a-9268-9d9fb3797ee2


Co-authored-by: Sojan Jose <sojan@pepalo.com>
2024-12-17 17:17:42 +05:30
Sojan Jose
12a82b6459 fix: avoid Slack file upload API for fallback messages (#10461)
Skip calling the Slack file upload API for message types such as
fallback (e.g., Facebook and location messages) that lack actual file
data in attachments. This prevents unnecessary API calls and resolves a
Sentry error currently occurring in production.

fixes: https://github.com/chatwoot/chatwoot/issues/10460
2024-11-26 12:56:40 +08:00
Sojan Jose
4a7a0427e9 feat: Provision captain accounts automatically (#10168)
- Provision accounts on Chatwoot cloud automatically if the feature is enabled
2024-09-26 19:21:29 -07:00
Sojan Jose
ab86f62fcc chore: Update GPT Model (#10111)
Update the open AI model, as 3.5 is being deprecated. Provide as option to swap out models via environment variables.
2024-09-16 09:41:20 +05:30
Muhsin Keloth
429d281501 fix: Handle OpenAI API errors (#9560) 2024-08-22 10:24:13 +05:30
Muhsin Keloth
a55fffab3a chore: Linear integration fixes (#9538) 2024-05-29 11:28:13 +05:30
Sivin Varghese
7c5e67bf28 feat: Adds backend support for rendering tables in articles (#9526) 2024-05-24 08:44:01 +05:30
Muhsin Keloth
023b3ad507 feat: Add APIs for linear integration (#9346) 2024-05-22 13:37:58 +05:30
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
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
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
Sojan Jose
35c26367da chore: Unset Redis config after spec (#8685)
The sentinel configuration set in this specification seems to be affecting other specifications. So, let's ensure that the memoised config variable gets unset after execution of the spec.
2024-01-10 15:32:48 -08:00
Nithin David Thomas
f002870c6a feat: Super admin design improvements (#8517)
- Revamp the super admin design
- Introduce a new settings page for support and billing settings
- Move the access tokens into users, agent bots and platform app show pages


Co-authored-by: Sojan <sojan@pepalo.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2023-12-08 19:40:35 -08:00
Muhsin Keloth
6c8dacfa0d feat: Facebook delivery reports (#8136) 2023-11-20 12:22:45 +05:30
Muhsin Keloth
5f503b1a57 feat: Change slack bot and activity message appearance (#8349) 2023-11-16 12:59:52 +05:30
Sivin Varghese
950f085e80 feat: Updated the design of the category page (#8165)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2023-11-08 18:03:16 -08:00
Muhsin Keloth
b4d20689b7 feat: Mark the messages as failed if the API channel webhooks fail for any reason. (#8277) 2023-11-04 12:26:28 +05:30
Shivam Mishra
36b6c0cb9c feat: support image height in markdown rendering of messages (#8177)
- This PR adds BaseMarkdownRenderer, it takes all the required attributes from the image node, parses the cw_image_height query and renders it.
2023-11-02 13:51:54 -07:00
Pranav Raj S
653e0335c0 fix: Handle PermissionDeniedError for Dialogflow processor (#8252) 2023-10-30 13:24:03 -07:00
Muhsin Keloth
26e8877cd9 feat: Support link unfurling for all the channels within the same connected channel account. (#8033) 2023-10-08 17:55:03 +05:30
Muhsin Keloth
24fe3805d8 feat: Slack link unfurling (#7940)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2023-09-29 19:35:56 +05:30
Nithin David Thomas
53dc38e650 fix: Renders youtube and vimeo links within blank lines as embeds (#7422)
Within the article we are now rendering every link for youtube and vimeo as embeds. This isn't a good solution, as users might need to have plain links as well. This fix will render only links within two blank lines as embeds.

Co-authored-by: Sojan Jose <sojan@pepalo.com>
2023-09-21 00:16:03 -07:00
Shivam Mishra
26ef21a243 feat: locking and retry in FB message parsing (#7701) 2023-08-23 09:48:17 +07:00
Muhsin Keloth
0d41853b0b fix: OpenAI CE specs (#7710) 2023-08-21 12:54:35 +07:00
Sojan Jose
178bc80b25 fix: Update email alerts for Slack integration (#7739)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2023-08-17 11:46:37 -07:00
Muhsin Keloth
cfe86d9c06 fix: Create new slack thread if the thread identifier changes (#7702)
Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
2023-08-11 14:19:49 +05:30
Muhsin Keloth
c1c3a62412 fix: Improve reply prompt (#7588)
Co-authored-by: Sojan Jose <sojan@chatwoot.com>
2023-08-09 10:25:37 +05:30
Muhsin Keloth
91c1061214 feat: Add more AI options (#7502)
Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2023-07-16 12:25:16 -07:00
Muhsin Keloth
19ff738211 feat: Add more options for AI reply suggestions (#7493) 2023-07-13 10:26:25 +05:30
Pranav Raj S
21691f2407 fix: Update breaking specs on sentiment and open AI integration (#7513) 2023-07-12 14:43:11 -07:00
Pranav Raj S
09f46aa912 chore: Update onMessage event to include conversation id (#7497) 2023-07-10 15:04:31 -07:00
Shivam Mishra
a940f4c1d2 feat: Allow label suggestions with OpenAI APIs (#7428) 2023-07-10 14:40:54 +05:30
Pranav Raj S
022f4f899f Revert "feat: Support Azure single-tenant application using the Graph… (#7436) 2023-06-29 16:50:18 -07:00
Tejaswini Chile
d05c953eef feat: Support Azure single-tenant application using the Graph API (#6728) (#6878) 2023-06-28 08:13:08 +05:30
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