send each line as a new message for got notifications

This commit is contained in:
Aaron Bieber 2020-10-07 14:40:46 +00:00
parent 4f03bc763a
commit 41007c4ad2

View File

@ -207,12 +207,14 @@ func main() {
return return
} }
log.Printf("GOT: sending '%s'\n", msg) for _, line := range strings.Split(msg, "\n") {
err = plugins.SendNotice(cli, got_room, msg) log.Printf("GOT: sending '%s'\n", line)
err = plugins.SendNotice(cli, got_room, line)
if err != nil { if err != nil {
http.Error(w, fmt.Sprintf("can not send commit info: %s", err), http.StatusInternalServerError) http.Error(w, fmt.Sprintf("can not send commit info: %s", err), http.StatusInternalServerError)
return return
} }
}
fmt.Fprintf(w, "ok") fmt.Fprintf(w, "ok")