From 07fdff979c34534650c88a8c677f0446500886be Mon Sep 17 00:00:00 2001 From: ehlxr Date: Wed, 20 Nov 2019 17:04:11 +0800 Subject: [PATCH] update at 2019-11-20 17:04:11 by ehlxr --- main.go | 9 ++++++++- version | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 172b33f..3ac082c 100644 --- a/main.go +++ b/main.go @@ -10,6 +10,7 @@ import ( "net/http" "os" "os/signal" + "strings" log "unknwon.dev/clog/v2" ) @@ -146,7 +147,13 @@ func requestHandle(w http.ResponseWriter, r *http.Request) { 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 { log.Error("%+v", err) _, _ = fmt.Fprintln(w, err) diff --git a/version b/version index 90ab6e9..8ce995b 100644 --- a/version +++ b/version @@ -1 +1 @@ -v0.0.2 \ No newline at end of file +v0.0.3 \ No newline at end of file