-
Notifications
You must be signed in to change notification settings - Fork 13k
fix: incoming webhook "Post As" field not updating userId #35795
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: incoming webhook "Post As" field not updating userId #35795
Conversation
|
Looks like this PR is ready to merge! 🎉 |
🦋 Changeset detectedLatest commit: b6d51cb The changes in this PR will be included in the next version bump. This PR includes changesets to release 36 packages
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 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #35795 +/- ##
===========================================
- Coverage 60.99% 60.98% -0.01%
===========================================
Files 2956 2956
Lines 70539 70539
Branches 16174 16174
===========================================
- Hits 43022 43015 -7
- Misses 24567 24573 +6
- Partials 2950 2951 +1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Signed-off-by: Abhinav Kumar <[email protected]>
Signed-off-by: Abhinav Kumar <[email protected]>
7ad512f to
ad84068
Compare
Signed-off-by: Abhinav Kumar <[email protected]>
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
|
/backport 7.5.2 |
1 similar comment
|
/backport 7.5.2 |
|
/backport 7.5.2 |
Proposed changes (including videos or screenshots)
Fixes the issue where updating the "Post As" field in the incoming webhook integration settings only changed the username and not the
userId, resulting in messages being sent as the original user.The integration now properly updates both
usernameanduserIdto ensure the message sender reflects the selected user.Issue(s)
Steps to test or reproduce
Further comments
CORE-1083
This pull request addresses an issue in the Rocket.Chat repository where the "Post As" field for incoming webhooks was not updating the
userIdcorrectly. The changes ensure that bothusernameanduserIdare properly synchronized when the 'Post As' field is updated. The update includes a refactor of the channel validation logic into a new functionvalidateChannels, improving code modularity and readability. Additionally, the handling of the associated user during integration updates is refined to modifyusernameanduserIdonly when explicitly provided. ThefindOneAndUpdatemethod is configured to return the updated document, which is a best practice. The changes also include adding thereturnDocumentoption in the outgoing integration update method to ensure the updated document is returned after the update operation.