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] Renaming agent's username within Livechat's department #10344

Merged

Conversation

renatobecker-zz
Copy link

@RocketChat/core

Closes #2115

When a user's username has changed and that user is an Livechat agent, it's necessary to rename their username in Livechat departments.

@@ -66,6 +66,7 @@ RocketChat._setUsername = function(userId, u) {
RocketChat.models.Rooms.replaceUsernameOfUserByUserId(user._id, username);
RocketChat.models.Subscriptions.setUserUsernameByUserId(user._id, username);
RocketChat.models.Subscriptions.setNameForDirectRoomsWithOldName(previousUsername, username);
RocketChat.models.LivechatDepartmentAgents.replaceUsernameOfAgentByUserId(user._id, username);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunate there is no afterSetUsername callback, which would fit best for this purpose. 😞

@sampaiodiego sampaiodiego merged commit 34e607c into develop Apr 16, 2018
@sampaiodiego sampaiodiego deleted the fix-rename-agent-username-within-livechat-departments branch April 16, 2018 23:33
@sampaiodiego sampaiodiego added this to the 0.64.0 milestone Apr 16, 2018
@rodrigok rodrigok mentioned this pull request Apr 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants