From fa74cd6d5a680246d4c5e5c5ecde3f7e44c2953d Mon Sep 17 00:00:00 2001 From: DJ Gillespie Date: Wed, 10 Sep 2025 18:38:45 -0600 Subject: [PATCH] auto-add country code 1 if missing --- app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index d43d720..9a6f171 100644 --- a/app.py +++ b/app.py @@ -39,7 +39,8 @@ async def mailgun_webhook( body_plain: str = Form("", alias="body-plain"), ): phone_jid_localpart = recipient.split("@")[0] - if len(phone_jid_localpart) == 9 + if len(phone_jid_localpart) == 9: + phone_jid_localpart = f"1{phone_jid_localpart}" target_jid = f"@_bifrost_=2b{phone_jid_localpart}=40cheogram.com:aria-net.org" message = f"{'('+subject+')' if subject else ''} {body_plain}" if body_plain else "(I got a text for you from Salesforce, but it didn't tell me what it was! - Monubot)"