Skip to content
Snippets Groups Projects
Commit 78fb5693 authored by Justin Ahn's avatar Justin Ahn
Browse files

using the correct methods to update the username, and setting a reason for the...

using the correct methods to update the username, and setting a reason for the toaster to show up properly
parent 1ccd5c3c
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,7 @@ Meteor.methods
return username
if not /^[0-9a-zA-Z-_.]+$/.test username
throw new Meteor.Error 'username-invalid'
throw new Meteor.Error 'username-invalid', TAPi18next.t('project:Username_invalid', username)
if not RocketChat.checkUsernameAvailability username
throw new Meteor.Error 'username-unavailable'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment