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] users.getPreferences when the user doesn't have any preferences #13532

Conversation

thayannevls
Copy link
Contributor

Closes #12976

When normal users doesn't have any preferences, user.settings is an empty object instead of undefined. My solution was to check both.

Maybe a better solution is all users start with settings as undefined.

@ggazzo ggazzo requested a review from sampaiodiego March 1, 2019 06:38
@sampaiodiego sampaiodiego added this to the 1.0.0 milestone Mar 1, 2019
@thayannevls
Copy link
Contributor Author

@rodrigok should I keep checking if is an empty object?

@MarcosSpessatto
Copy link
Contributor

@thayannevls no, you can remove it.

@MarcosSpessatto
Copy link
Contributor

@thayannevls can you please fix the conflicts?

@thayannevls thayannevls force-pushed the fix-getPreferences-when-user-doesnt-have-preferences branch from e512d7c to 0cabdb7 Compare March 15, 2019 14:28
@thayannevls
Copy link
Contributor Author

@MarcosSpessatto Fixed it! Sorry for the delay.

@rodrigok rodrigok merged commit 1e82c37 into RocketChat:develop Apr 6, 2019
@rodrigok rodrigok mentioned this pull request Apr 28, 2019
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.

None yet

4 participants