Maptio / maptio

http://www.maptio.com
Other
24 stars 5 forks source link

Ignore case when comparing emails during deduplication #792

Closed rgoj closed 1 year ago

rgoj commented 2 years ago

Problem

When deduplication is triggered by the server responding with a 409 conflict as a user is being invited, we perform a search for users with the same email... and that search is case-sensitive.

This is what happened here: https://app.intercom.com/a/inbox/q3x5lnhp/inbox/shared/all/conversation/106323200004275 (see message from 8 November 2022)

Instructions for reproducing

  1. First, create (log in) a user with an email like "first.name@exmple.com"
  2. Add a user with an email like "First.Name@example.com"
  3. Invite the user
  4. You should receive an error message and you'll see an unhandled 409 error in the console

Expected behavior

Instead of the error message, you should see a prompt to add an existing user instead.

Fix

Just perform the checks in a case insensitive way! Do the same for searches via names too.

rgoj commented 1 year ago

Would be nice to get this done (it should be very small) at some point when I'm in the area, perhaps during #709 ?