diff options
Diffstat (limited to 'handler.go')
| -rw-r--r-- | handler.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -28,10 +28,9 @@ func WebhookHandler(w http.ResponseWriter, r *http.Request) { err := decoder.Decode(&hook) if err != nil { - - content, err := ioutil.ReadAll(r.Body) + content, cError := ioutil.ReadAll(r.Body) if err != nil { - log.Println("Can't read r.Body.", err) + log.Println("Can't read r.Body.", cError) } body := string(content) @@ -41,6 +40,7 @@ func WebhookHandler(w http.ResponseWriter, r *http.Request) { w.Write([]byte("Wrong JSON. " + err.Error() + " Original message: " + body)) return } + if hook.Join != "" { log.Println("Joining #" + hook.Join) con.Join("#" + hook.Join) |
