From e05bb24a0d84490ec23704d610630e2dc7d7f2a3 Mon Sep 17 00:00:00 2001 From: indes Date: Sun, 20 Jun 2021 17:38:25 +0800 Subject: [PATCH] feat: message arg --- api/notify/index.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/notify/index.go b/api/notify/index.go index a54ea4b..6ef685b 100644 --- a/api/notify/index.go +++ b/api/notify/index.go @@ -13,8 +13,9 @@ func Handler(w http.ResponseWriter, r *http.Request) { params := r.URL.Query() userId, _ := strconv.Atoi(params.Get("u")) + msg := params.Get("m") - if err := bot.NotifyTxtMessage(userId, "hello, I am telepush!"); err != nil { + if err := bot.NotifyTxtMessage(userId, msg); err != nil { fmt.Fprintf(w, "send message to %d failed!", userId) return }