-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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] Changing Room name updates the webhook #13672
Conversation
@knrt10 I made a few changes, we usually create a file for each method... and its not a client concern update webhooks... please check if you agree |
@ggazzo totally agree with you. It would have been on server side. Looks good, intially I created method only but nothing happened, it maybe because I didn’t restart the server again. Checked after restarting, working now. 👍 |
@knrt10 can you fix the conflicts please? |
Yes let me update it |
ad41520
to
0a4f607
Compare
@rodrigok rebased |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
current code is not working, that's why tests are failing on renaming channels.
please see suggested changes.
updateRoomName(oldRoomName, newRoomName) { | ||
const hashedOldRoomName = `#${ oldRoomName }`; | ||
const hashedNewRoomName = `#${ newRoomName }`; | ||
const changedNumber = Integrations.update({ channel: hashedOldRoomName }, { $set: { 'channel.$': hashedNewRoomName } }, { multi: true }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const changedNumber = Integrations.update({ channel: hashedOldRoomName }, { $set: { 'channel.$': hashedNewRoomName } }, { multi: true }); | |
return this.update({ channel: hashedOldRoomName }, { $set: { 'channel.$': hashedNewRoomName } }, { multi: true }); |
const hashedOldRoomName = `#${ oldRoomName }`; | ||
const hashedNewRoomName = `#${ newRoomName }`; | ||
const changedNumber = Integrations.update({ channel: hashedOldRoomName }, { $set: { 'channel.$': hashedNewRoomName } }, { multi: true }); | ||
return changedNumber; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return changedNumber; |
@sampaiodiego updated |
* Fixes RocketChat#8477 * Rebased branch * CI fix
Closes #8477
@MartinSchoeler @ggazzo would you please review.