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: Serialize the default user keys in setUser #926

Merged
merged 3 commits into from
Jun 10, 2020
Merged

Conversation

jennmueng
Copy link
Member

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Passes the default user keys to the serialization helper before passing it to native.

💡 Motivation and Context

Users would be able to use non-strings such as ints or doubles as user ids or in any other default user field.
Fixes #922

💚 How did you test it?

Tested by passing 3.14159265359 as a user id on both Android and iOS, performed native crashes and assured that the user is correct on the Sentry dashboard.

Also added a test that setUser serializes all object keys and splits into a second data object.

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • All tests passing

🔮 Next steps

Copy link
Contributor

@marandaneto marandaneto left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@HazAT HazAT left a comment

Choose a reason for hiding this comment

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

🍰 Changelog 😅

@jennmueng
Copy link
Member Author

😅

@jennmueng jennmueng merged commit 8d8a643 into master Jun 10, 2020
@jennmueng jennmueng deleted the fix/serialize-user branch June 10, 2020 13:03
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.

not record error in app authenticated
4 participants