This commit is contained in:
Ted Unangst 2022-02-05 16:54:41 -05:00
parent 1af5998b20
commit 979b64256b
1 changed files with 1 additions and 1 deletions

2
web.go
View File

@ -2302,7 +2302,6 @@ func honkhonkline() {
func apihandler(w http.ResponseWriter, r *http.Request) { func apihandler(w http.ResponseWriter, r *http.Request) {
u := login.GetUserInfo(r) u := login.GetUserInfo(r)
userid := u.UserID userid := u.UserID
user, _ := butwhatabout(u.Username)
action := r.FormValue("action") action := r.FormValue("action")
wait, _ := strconv.ParseInt(r.FormValue("wait"), 10, 0) wait, _ := strconv.ParseInt(r.FormValue("wait"), 10, 0)
log.Printf("api request '%s' on behalf of %s", action, u.Username) log.Printf("api request '%s' on behalf of %s", action, u.Username)
@ -2362,6 +2361,7 @@ func apihandler(w http.ResponseWriter, r *http.Request) {
j["honks"] = honks j["honks"] = honks
j.Write(w) j.Write(w)
case "sendactivity": case "sendactivity":
user, _ := butwhatabout(u.Username)
public := r.FormValue("public") == "1" public := r.FormValue("public") == "1"
rcpts := boxuprcpts(user, r.Form["rcpt"], public) rcpts := boxuprcpts(user, r.Form["rcpt"], public)
msg := []byte(r.FormValue("msg")) msg := []byte(r.FormValue("msg"))