From f9a19b2f80825736d33ea821576a933896825257 Mon Sep 17 00:00:00 2001 From: "K. Isom" Date: Mon, 19 Apr 2021 13:20:27 -0700 Subject: [PATCH] Better reply method. --- conn/twilio/handler.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/conn/twilio/handler.go b/conn/twilio/handler.go index fd92d25..e520969 100644 --- a/conn/twilio/handler.go +++ b/conn/twilio/handler.go @@ -36,15 +36,10 @@ func handler(w http.ResponseWriter, r *http.Request) { return } - w.Write([]byte("accepted")) - response, err := cps.Handle(context.Background(), message.Body) if err != nil { log.Printf("twilio receive hook: %s", err) } - err = Send(message.Source, response.String()) - if err != nil { - log.Printf("twilio receive hook: %s", err) - } + w.Write([]byte(response.String())) }