Closed dmi3coder closed 3 years ago
@donglinw-fb has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
@donglinw-fb merged this pull request in facebook/facebook-python-business-sdk@73880cd370867b199bc2d3677fe57514184dfb8c.
There's a chance that some phone numbers can have incorrect structure that can't match the
Normalise.get_international_number
. Specificallyinternational_number_regex.match(phone_number)
could return None, and calling.group()
on non will cause exception This pull request checks ifinternational_number_regex.match(phone_number)
returns None or not. Also renamedNormalize.is_international_number
toNormalize.get_international_number
since name is misleading, and method returns a value that's used later