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

adding the ability to edit usernames #696

Merged
merged 5 commits into from
Sep 6, 2015
Merged

adding the ability to edit usernames #696

merged 5 commits into from
Sep 6, 2015

Conversation

soonahn
Copy link
Contributor

@soonahn soonahn commented Sep 5, 2015

Addresses #695

@soonahn
Copy link
Contributor Author

soonahn commented Sep 5, 2015

I also removed a bunch of redspace near where I was working. Long empty lines make me cringe to see, can't help but remove.

@geekgonecrazy
Copy link
Contributor

Just a little UI request. Maybe order Username / Password / Language ?

@soonahn
Copy link
Contributor Author

soonahn commented Sep 5, 2015

Sure thing

@soonahn
Copy link
Contributor Author

soonahn commented Sep 5, 2015

Added the username as a placeholder.

@geekgonecrazy
Copy link
Contributor

Looks great! Thank you!

@engelgabriel
Copy link
Member

Guys, update the username is not that simple. You need to use the method. There are a lot of checking and references that need o be updated together, not just the users collection.

@engelgabriel
Copy link
Member

Need to call /packages/rocketchat-lib/server/methods/setUsername.coffee

@soonahn
Copy link
Contributor Author

soonahn commented Sep 5, 2015

Setting the username properly. Hopefully good enough!

@soonahn
Copy link
Contributor Author

soonahn commented Sep 5, 2015

@engelgabriel updated, anything else missing?

@geekgonecrazy
Copy link
Contributor

@soonahn Sorry for the confusion. I thought I had mentioned the use of Meteor.call 'setUsername' method when we initially talked.

Tested this out. (this time with actual messages to make sure those are still changed) Sorry oversight last time. :)

LGTM i'll leave this for @engelgabriel though. :)

@@ -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)
Copy link
Member

Choose a reason for hiding this comment

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

Why TAPi18next.t('project:Username_invalid', username)?
The translation should not be done on the server side, as the client may be using a different language.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Still new to Meteor, unsure which pieces fit where. I assumed the client data got passed down and translated then passed back up to the server.

Sorry! I'll read the docs better next time.

engelgabriel added a commit that referenced this pull request Sep 6, 2015
adding the ability to edit usernames
@engelgabriel engelgabriel merged commit 2c87ad8 into RocketChat:master Sep 6, 2015
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.

3 participants