[FIX] Changing Room name updates the webhook#13672
Merged
sampaiodiego merged 3 commits intoRocketChat:developfrom Mar 14, 2019
Merged
[FIX] Changing Room name updates the webhook#13672sampaiodiego merged 3 commits intoRocketChat:developfrom
sampaiodiego merged 3 commits intoRocketChat:developfrom
Conversation
Member
|
@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 |
Contributor
Author
|
@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. 👍 |
Member
|
@knrt10 can you fix the conflicts please? |
Contributor
Author
|
Yes let me update it |
ad41520 to
0a4f607
Compare
Contributor
Author
|
@rodrigok rebased |
rodrigok
previously approved these changes
Mar 13, 2019
sampaiodiego
requested changes
Mar 14, 2019
Member
sampaiodiego
left a comment
There was a problem hiding this comment.
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 }); |
Member
There was a problem hiding this comment.
Suggested change
| 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; |
Member
There was a problem hiding this comment.
Suggested change
| return changedNumber; |
Contributor
Author
|
@sampaiodiego updated |
sampaiodiego
approved these changes
Mar 14, 2019
bhardwajaditya
pushed a commit
to bhardwajaditya/Rocket.Chat
that referenced
this pull request
Mar 14, 2019
* Fixes RocketChat#8477 * Rebased branch * CI fix
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #8477
@MartinSchoeler @ggazzo would you please review.