mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 15:31:15 -05:00
Before the search term was either: - an email address (or partial email address) - a phone number (or partial phone number) Now it can also be: - a reference (or partial reference) We can take a pretty good guess, by looking at the search term, whether the thing the user is searching by email address or phone number. This helps us: - only show relevant notifications - normalise the search term to give the best chance of matching what we store in the `normalised_to` field However we can’t look at a search term and guess whether it’s a reference, because a reference could take any format. Therefore if the user hasn’t told us what kind of thing their search term is, we should stop trying to guess.