| from db import supabase | |
| def log_message(customer_phone: str, bot_number: str, direction: str, message: str): | |
| payload = { | |
| "customer_phone": customer_phone, | |
| "bot_number": bot_number, | |
| "direction": direction, | |
| "message": message, | |
| } | |
| return supabase.table("chat_messages").insert(payload).execute() |