def incoming_message(request): kwargs = { "event" : request.POST.get("event"), "message_id" : request.POST.get("id"), "message_type" : request.POST.get("message_type"), "from_number" : request.POST.get("from_number"), "contact_id" : request.POST.get("contact_id"), "phone_id" : request.POST.get("phone_id"), "to_number" : request.POST.get("to_number"), "time_created" : request.POST.get("time_created"), "time_sent" : request.POST.get("time_sent"), "content" : request.POST.get("content"), "project_id" : request.POST.get("project_id"), "secret" : request.POST.get("secret"), } process_incoming_message.delay(**kwargs) return HttpResponse()
def incoming_message(request): kwargs = {a: request.POST.get(b) for (a, b) in TELERIVET_INBOUND_FIELD_MAP} process_incoming_message.delay(**kwargs) return HttpResponse()