include a bit more info in api responses
Ted Unangst tedu@tedunangst.com
Mon, 05 Feb 2024 01:51:03 -0500
1 files changed,
3 insertions(+),
1 deletions(-)
jump to
M
web.go
→
web.go
@@ -2550,6 +2550,7 @@ userid := u.UserID
action := r.FormValue("action") wait, _ := strconv.ParseInt(r.FormValue("wait"), 10, 0) dlog.Printf("api request '%s' on behalf of %s", action, u.Username) + user, _ := butwhatabout(u.Username) switch action { case "honk": h := submithonk(w, r)@@ -2624,9 +2625,10 @@ }
reverbolate(userid, honks) j := junk.New() j["honks"] = honks + j["mecount"] = user.Options.MeCount + j["chatcount"] = user.Options.ChatCount j.Write(w) case "sendactivity": - user, _ := butwhatabout(u.Username) public := r.FormValue("public") == "1" rcpts := boxuprcpts(user, r.Form["rcpt"], public) msg := []byte(r.FormValue("msg"))