Update routes/threecx.py

Lowered the upgrade threshold to 158 characters.  I've seen some fringe cases where 159 or 160 still gets bounced.  Probably due to some byte count / character count mismatch when using emojis.
This commit is contained in:
edschuy95 2025-11-13 00:35:20 +00:00
parent 464bb8ed12
commit ebad7487b3

View file

@ -35,7 +35,7 @@ def handle_threecx_outbound():
text = json_data.get("text", "") text = json_data.get("text", "")
media_urls = json_data.get("media_urls", []) media_urls = json_data.get("media_urls", [])
is_mms = bool(media_urls) or len(text) > 160 is_mms = bool(media_urls) or len(text) > 158
if is_mms and not media_urls: if is_mms and not media_urls:
json_data["media_urls"] = [""] json_data["media_urls"] = [""]