web_handler.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:DecidePolitics 作者: georgeaf99 项目源码 文件源码
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
    ))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号