update at 2019-11-20 17:04:11 by ehlxr
This commit is contained in:
parent
3e22a37dab
commit
07fdff979c
9
main.go
9
main.go
@ -10,6 +10,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
|
"strings"
|
||||||
log "unknwon.dev/clog/v2"
|
log "unknwon.dev/clog/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -146,7 +147,13 @@ func requestHandle(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
err = dingTalk.SendTextMessage(content, opts.Robot.AtMobiles, opts.Robot.IsAtAll)
|
ats := opts.Robot.AtMobiles
|
||||||
|
at := r.Form.Get("at")
|
||||||
|
if at != "" {
|
||||||
|
ats = append(ats, strings.Split(at, ",")...)
|
||||||
|
}
|
||||||
|
|
||||||
|
err = dingTalk.SendTextMessage(content, ats, opts.Robot.IsAtAll)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("%+v", err)
|
log.Error("%+v", err)
|
||||||
_, _ = fmt.Fprintln(w, err)
|
_, _ = fmt.Fprintln(w, err)
|
||||||
|
Loading…
Reference in New Issue
Block a user