Python3 cli app to bridge SMS/MMS to matrix/riot.im
#4
(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!
  Reply


Messages In This Thread
RE: Python3 cli app to bridge SMS/MMS to matrix/riot.im - by FutureBucket - 02-24-2020, 07:57 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Lightbulb Python3 - GPIO - controlling LED's etc bonce 1 2,869 06-06-2021, 09:43 AM
Last Post: bonce
  Python3 Bridge SMS/MMS to Matrix using Modem Manager and MMSD FutureBucket 3 5,151 02-10-2021, 08:09 PM
Last Post: kop316
  AV call with Matrix Dmytro 0 2,476 07-30-2020, 03:23 AM
Last Post: Dmytro
  Riot Web support Dmytro 1 2,731 06-20-2020, 01:42 PM
Last Post: Dmytro

Forum Jump:


Users browsing this thread: 1 Guest(s)