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

If metadata contains userId property, value passed for userId prop is ignored #15

Open
bflemi3 opened this issue Feb 12, 2021 · 0 comments

Comments

@bflemi3
Copy link

bflemi3 commented Feb 12, 2021

Version: 1.2.1

Problem

Even though I'm passing profile.email as the userId prop, when I go to the Feedback Fish dashboard the userId field for the feedback is showing as profile.userId and I don't have the option to "Reply with Mail".

<FeedbackFish 
  projectId={process.env.REACT_APP_FEEDBACK_FISH_PROJECT as string} 
  userId={profile.email}
  metadata={profile}
>
...
</FeedbackFish>

Here's the profile I'm sending as metadata. Some fields removed or redacted...

{
  avatar: ""
  displayName: "REDACTED"
  email: "dev@REDACTED"
  isSuperAdmin: true
  products: [REDACTED]
  subject: "REDACTED"
  userId: 17
}

Expected Behavior

Since the documentation says to pass the email address of the user, I would expect that no matter what I pass in the metadata, the value I assign to the userId prop would be respected (maybe even validated to be an email - a warning could be displayed in the console in development mode). Especially with the "Reply with Mail" feature seeming to hinge on the value of the userId prop being an email address.

It may even make sense to change the userId prop to email to be more clear what you're asking for.

Actual Behavior

The value of the userId field shown in the Feedback Fish shows 17, which is the value of profile.userId passed in metadata. Furthermore, the "Reply with Mail" button is not displayed in the Feedback Fish dashboard.

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

No branches or pull requests

1 participant