Can't use my own body :(
Build, push image, and notify Watchtower / build-image (push) Successful in 44s
Build, push image, and notify Watchtower / notify (push) Successful in 13s

This commit is contained in:
2026-08-17 16:47:35 +02:00
parent c049339003
commit 647e40131c
+3 -11
View File
@@ -17,16 +17,6 @@ def send_alert_sms(to_phone: str, room_title: str, room_link: str = None, client
print("No recipient phone number provided for SMS.") print("No recipient phone number provided for SMS.")
return False return False
# --- PRINT LINK/INFO BEFORE SENDING ---
print("\n" + "="*50)
print(f"[Twilio] Preparing SMS for: {to_phone}")
print(f"[Twilio] Room Title: {room_title}")
if room_link:
print(f"[Twilio] Room Link: {room_link}")
else:
print(f"[Twilio] Link: Invitation email sent to {client_email or 'client inbox'}")
print("="*50 + "\n")
# --- BUILD SMS CONTENT --- # --- BUILD SMS CONTENT ---
body = ( body = (
f"Alert: A technical issue occurred with your SmartWave equipment/microwave. " f"Alert: A technical issue occurred with your SmartWave equipment/microwave. "
@@ -41,10 +31,12 @@ def send_alert_sms(to_phone: str, room_title: str, room_link: str = None, client
else: else:
body += "An invitation link has been sent to your inbox." body += "An invitation link has been sent to your inbox."
print(f"Sending SMS to {to_phone} : \"{body}\"")
try: try:
client = Client(account_sid, auth_token) client = Client(account_sid, auth_token)
message = client.messages.create( message = client.messages.create(
body=body, body="sms_event_notifications",
from_=from_phone, from_=from_phone,
to=to_phone to=to_phone
) )