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 optional field #4

Merged
merged 4 commits into from
Nov 11, 2021
Merged

Fix optional field #4

merged 4 commits into from
Nov 11, 2021

Conversation

debiff
Copy link

@debiff debiff commented Nov 9, 2021

This PR allow to identify anonymously a user using this possible permutations:

  • name=undefined, email=undefined
  • name=defined, email=undefined
  • name=undefined, email=defined
  • name=defined, email=defined

@debiff debiff requested a review from Undermaken November 9, 2021 16:45
index.d.ts Outdated
@@ -52,9 +52,9 @@ declare module 'io-react-native-zendesk' {

interface UserInfo {

Choose a reason for hiding this comment

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

To avoid type redefinition could UserInfo be an extension of AnonymousIdentity?

interface UserInfo extends AnonymousIdentity{
    // user's phone
    phone?: number
    // department to redirect the chat
    department?: string
    // tags for chat
    tags?: Array<string>
  }

Copy link
Author

Choose a reason for hiding this comment

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

Yes, it could. Thank you. Refactored in 4b9b6ef

@debiff debiff requested a review from Undermaken November 11, 2021 17:15
@Undermaken Undermaken merged commit 028688e into main Nov 11, 2021
@Undermaken Undermaken deleted the fix-optional-field branch November 11, 2021 17:45
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.

2 participants