Skip to content

Conversation

@abhinavkrin
Copy link
Member

@abhinavkrin abhinavkrin commented Jul 9, 2025

Proposed changes (including videos or screenshots)

Adds a new boolean parameter separateResponse to the incoming webhook configuration. When enabled, the API will return an array of result objects—one per channel—indicating individual success or error. If separateResponse is disabled (the default), the server will first validate all target channels; on validation failure it returns a single success: false without sending any messages, or on success it sends to all channels and returns success: true.

This PR also fixes an issue where in an outgoing integrations, if the message returned from the webhook had multiple channels, the messages would be sent but it would show only one channel in history.

Issue(s)

Steps to test or reproduce

  1. Create an incoming integration.
  2. Add post as user
  3. Add two channels, one the user has access to and the another the user does not has access to.
  4. Execute the integration with different values of separateResponse in the payload. When true -> separate response will be returned. In case of falsy -> message wont be sent to either of the channels since it would have failed for the channel which the user can't access.

Further comments

SUP-779

@abhinavkrin abhinavkrin requested a review from a team as a code owner July 9, 2025 13:47
@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Jul 9, 2025

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Jul 9, 2025

🦋 Changeset detected

Latest commit: 77becba

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 36 packages
Name Type
@rocket.chat/meteor Minor
@rocket.chat/core-typings Minor
@rocket.chat/rest-typings Minor
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/freeswitch Patch
@rocket.chat/fuselage-ui-kit Major
@rocket.chat/gazzodown Major
@rocket.chat/http-router Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-avatar Major
@rocket.chat/ui-client Major
@rocket.chat/ui-contexts Major
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/models Patch
@rocket.chat/network-broker Patch
@rocket.chat/mock-providers Patch
@rocket.chat/ui-video-conf Major
@rocket.chat/ui-voip Major
@rocket.chat/instance-status Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Jul 9, 2025

PR Preview Action v1.6.2

🚀 View preview at
https://RocketChat.github.io/Rocket.Chat/pr-preview/pr-36386/

Built to branch gh-pages at 2025-07-17 15:42 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@codecov
Copy link

codecov bot commented Jul 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.57%. Comparing base (302ef05) to head (77becba).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #36386      +/-   ##
===========================================
- Coverage    65.57%   65.57%   -0.01%     
===========================================
  Files         3172     3172              
  Lines       105477   105477              
  Branches     20041    20058      +17     
===========================================
- Hits         69170    69166       -4     
- Misses       33627    33629       +2     
- Partials      2680     2682       +2     
Flag Coverage Δ
e2e 58.12% <ø> (-0.02%) ⬇️
unit 70.69% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@abhinavkrin abhinavkrin changed the title feat: add separateResponse param to incoming webhooks for optional per-channel responses markdown Copy Edit feat: add separateResponse param to incoming webhooks for optional per-channel responses markdown Jul 9, 2025
@abhinavkrin abhinavkrin force-pushed the feat/separate-api-response-for-webhooks-on-multiple-channels branch 2 times, most recently from 2536d92 to 40b38ea Compare July 14, 2025 13:32
@abhinavkrin abhinavkrin force-pushed the feat/separate-api-response-for-webhooks-on-multiple-channels branch from 40b38ea to f5e7af8 Compare July 16, 2025 07:47
Signed-off-by: Abhinav Kumar <[email protected]>
@abhinavkrin abhinavkrin added this to the 7.9.0 milestone Jul 16, 2025
@abhinavkrin abhinavkrin added the stat: QA assured Means it has been tested and approved by a company insider label Jul 17, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Jul 17, 2025
@kodiakhq kodiakhq bot merged commit 9f3c11c into develop Jul 17, 2025
87 of 89 checks passed
@kodiakhq kodiakhq bot deleted the feat/separate-api-response-for-webhooks-on-multiple-channels branch July 17, 2025 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants