Skip to content

Commit

Permalink
New plugin: SMS Twilio
Browse files Browse the repository at this point in the history
  • Loading branch information
IMHarris committed Jul 12, 2024
1 parent 940565d commit e7916cf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sms_twilio/sms_twilio.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ def send_sms(name, **kwargs):
Send message to SMS provider
"""
print(u"SMS message request received from {}: {}".format(name, kwargs[u"msg"]))
if not SMS_ENABLED:
print("Twilio SMS Disabled")
return "Twilio SMS Disabled"
if PAUSE_NOTIFICATIONS or sms_obj.pause_messaging:
print(u"SMS message not sent as messages have been paused")
return u"SMS message not sent as messages have been paused"
Expand All @@ -106,6 +109,9 @@ def send_voice(name, **kwargs):
Send message to voice provider
"""
print(u"Voice message request received from {}: {}".format(name, kwargs[u"msg"]))
if not SMS_ENABLED:
print("Twilio Voice Disabled")
return u"Twilio Voice Disabled"
if PAUSE_NOTIFICATIONS or voice_obj.pause_messaging:
print(u"Voice message not sent as messages have been paused")
return u"Voice message not sent as messages have been paused"
Expand Down

0 comments on commit e7916cf

Please sign in to comment.