(20250227) prepending 0 to kenyan phone nos.
This commit is contained in:
@@ -230,8 +230,17 @@ async def generate_otp(
|
||||
)
|
||||
|
||||
# Format the message:
|
||||
phone_no = regex.replace(
|
||||
text = inbound_data.recipientNo,
|
||||
pattern = r"[^\d]",
|
||||
substitute_text = ""
|
||||
)
|
||||
if (
|
||||
not phone_no.startswith("0") and
|
||||
not phone_no.startswith("254")
|
||||
): phone_no = "0" + phone_no
|
||||
sms_message = SavvyBulkSMSKenyaMessage(
|
||||
recipientNo = inbound_data.recipientNo,
|
||||
recipientNo = phone_no,
|
||||
text = inbound_data.smsText.replace(inbound_data.smsReplace, str(otp_response.data))
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user