all repos — honk @ ca048e193e8123108efca050b1e91ae19d07bf81

my fork of honk

include a bit more info in api responses
Ted Unangst tedu@tedunangst.com
Mon, 05 Feb 2024 01:51:03 -0500
commit

ca048e193e8123108efca050b1e91ae19d07bf81

parent

66cd194138a46f79931c870a7fe8f055a4d0028e

1 files changed, 3 insertions(+), 1 deletions(-)

jump to
M web.goweb.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"))