Skip to content

Commit

Permalink
feat: message arg
Browse files Browse the repository at this point in the history
  • Loading branch information
indes committed Jun 20, 2021
1 parent 6efddbf commit e05bb24
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/notify/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit e05bb24

Please sign in to comment.