Skip to content

Commit

Permalink
Enable sudo mode for SMS sending via API
Browse files Browse the repository at this point in the history
Added `sudo()` to the `send_sms` method call to ensure proper permissions when sending SMS. This prevents potential access rights issues that might arise during message processing.
  • Loading branch information
dhongu committed Feb 4, 2025
1 parent c79ec1b commit 49f21ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deltatech_sms/models/sms_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def _contact_iap(self, local_endpoint, params, timeout=15):
for message in params["messages"]:
res_value = {"state": "success", "res_id": message["res_id"]}

response = account.send_sms(message["number"], message["content"])
response = account.sudo().send_sms(message["number"], message["content"])

if response["status"] != 200:
res_value["state"] = "server_error"
Expand Down

0 comments on commit 49f21ff

Please sign in to comment.