02-24-2020, 07:57 PM
(This post was last modified: 02-24-2020, 08:12 PM by FutureBucket.)
(02-24-2020, 05:46 PM)MartijnBraam Wrote: I see you have some code to remove +1 from your number, this will break for anyone that's not in a country that has country code 1 like USA, for example it's +31 in NL. the proper way is using a phone number handleing library for this since the length of the prefix is variable.
Ah, good idea. I never even thought about looking for a phone number library. I was thinking about changing it to using the last 10 numbers but I like your idea better. Thank you!
Its just Telus here in Canada who is inconsistent. Incoming SMSes are 2505551234 but incoming MMSes are +12505551234. I just did a quick thing to remove +1 from MMSes only. Now that I have a pretty good base and I think my design is alright I'm going to go back though it and clean it up a bit
Edit:
https://pypi.org/project/phonenumbers/
This is awesome, its exactly what I need. I'll get this in there next!