Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correct parameter order in afterSaveMessage to restore outgoing webhooks and related features #33295

Merged
merged 6 commits into from
Sep 17, 2024

Conversation

ricardogarim
Copy link
Contributor

@ricardogarim ricardogarim commented Sep 16, 2024

After upgrading from Rocket.Chat version 6.9.0 to 6.12.0, outgoing integrations stopped functioning. The root cause was traced to a change in the parameter order passed by the afterSendMessage callback to the sendMessage event from the integrations app triggers. Specifically, the room parameter was not forwarded correctly, resulting in errors when searching for outgoing webhook triggers.

This issue was introduced by PR #33034, which modified the afterSaveMessage parameter signature but did not update the corresponding integration logic.

As outlined in SUP-665, this malfunction blocked the propagation of certain actions due to the callback failing to forward the correct parameters.

This PR resolves the issue by correcting the parameter order, ensuring the room parameter is passed correctly, thus restoring the functionality of outgoing webhooks.

Additionally, the same issue affected the following areas, which have now been fixed:

  • IRC Bridge: Fixed an issue where the service failed to bind Rocket.Chat users with their correct IRC nickname or channel path.
  • Autotranslate: Resolved an issue preventing messages from being automatically translated.
  • EngagementDashboard: Corrected the issue where new messages were not being counted in the engagement dashboard.

Copy link
Contributor

dionisio-bot bot commented Sep 16, 2024

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is targeting the wrong base branch. It should target 6.12.0, but it targets 6.13.0

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

Copy link

changeset-bot bot commented Sep 16, 2024

🦋 Changeset detected

Latest commit: 5c6f124

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

This PR includes changesets to release 28 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings 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/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-contexts Patch
@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/uikit-playground Patch
@rocket.chat/models Patch
@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

@ricardogarim ricardogarim force-pushed the regression/integration-sendMessage branch from efd5b78 to d0e5554 Compare September 16, 2024 15:42
Copy link
Contributor

github-actions bot commented Sep 16, 2024

PR Preview Action v1.4.8
Preview removed because the pull request was closed.
2024-09-17 14:06 UTC

Copy link

codecov bot commented Sep 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.70%. Comparing base (b919221) to head (5c6f124).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop   #33295   +/-   ##
========================================
  Coverage    59.70%   59.70%           
========================================
  Files         2551     2551           
  Lines        62792    62792           
  Branches     14102    14102           
========================================
  Hits         37492    37492           
  Misses       22893    22893           
  Partials      2407     2407           
Flag Coverage Δ
unit 76.91% <ø> (ø)

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

@ricardogarim ricardogarim force-pushed the regression/integration-sendMessage branch from d0e5554 to 3fcf0fa Compare September 16, 2024 15:55
@ricardogarim ricardogarim force-pushed the regression/integration-sendMessage branch from 3fcf0fa to 15a7b3c Compare September 16, 2024 15:57
@ricardogarim ricardogarim changed the title regression: fix parameter order in callbackHandler to restore outgoing integrations fix: parameter order in callbackHandler to restore outgoing integrations Sep 16, 2024
@ricardogarim ricardogarim marked this pull request as ready for review September 16, 2024 19:03
@sampaiodiego sampaiodiego added this to the 6.12 milestone Sep 16, 2024
@ricardogarim ricardogarim changed the title fix: parameter order in callbackHandler to restore outgoing integrations fix: correct parameter order in afterSaveMessage to restore outgoing webhooks and related features Sep 16, 2024
@jessicaschelly jessicaschelly added the stat: QA assured Means it has been tested and approved by a company insider label Sep 16, 2024
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Sep 16, 2024
@ricardogarim ricardogarim force-pushed the regression/integration-sendMessage branch from b3ba9ce to 85077f3 Compare September 17, 2024 11:22
@kodiakhq kodiakhq bot merged commit 636d32d into develop Sep 17, 2024
50 checks passed
@kodiakhq kodiakhq bot deleted the regression/integration-sendMessage branch September 17, 2024 14:06
@scuciatto
Copy link
Member

/patch

Copy link
Contributor

dionisio-bot bot commented Sep 17, 2024

Pull request #33304 added to Project: "undefined"

@scuciatto scuciatto modified the milestones: 6.12, 6.13 Sep 17, 2024
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.

5 participants