-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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 #857 Cannot add user to room. #860
Conversation
adds arugment validation.
@marceloschmidt - insomnia? |
@Sing-Li the label is added by waffle.io 😛 |
I'm looking into this.. I found some other bugs, trying to fix them too |
btw, thanks @rwakida for the quick fix 😄 |
@@ -13,7 +19,7 @@ Meteor.methods | |||
if room.usernames.indexOf(data.username) isnt -1 | |||
return | |||
|
|||
newUser = RocketChat.models.Users.findOneByUsername username: data.username |
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.
My bad, sorry :(
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.
You made a lot of changes. It's hard to catch everything. 😄
I like how you consolidated the logic into the models. It should be a lot easier to maintain.
N/P @sampaiodiego . I'll be the late night Hawaii tech support. 😀 |
Fix bug where username incorrectly passed to findOneByUsername. Also adds argument validation.