def handle_message(customer_uuid):
"""Handles messages from a phone number with body
@param customer_uuid The UUID of the sender
@data message_body The body of the message
"""
data = jsonpickle.decode(request.data.decode("utf-8"))
message_body = data["message_body"]
# Retrieve the message and create the customer
customer = Customer.load_from_db(customer_uuid)
messaging.on_message_recieve(customer, message_body)
return jsonpickle.encode(dict(
success=True
))
评论列表
文章目录