diff --git a/views/honkpage.js b/views/honkpage.js index f0283e3..9d2bc66 100644 --- a/views/honkpage.js +++ b/views/honkpage.js @@ -148,6 +148,8 @@ function hydrargs() { args["c"] = arg } else if (name == "honker") { args["xid"] = arg + } else if (name == "user") { + args["uname"] = arg } return args } diff --git a/web.go b/web.go index 4637b41..d07c132 100644 --- a/web.go +++ b/web.go @@ -712,6 +712,8 @@ func showuser(w http.ResponseWriter, r *http.Request) { u := login.GetUserInfo(r) honks := gethonksbyuser(name, u != nil && u.Username == name, 0) templinfo := getInfo(r) + templinfo["PageName"] = "user" + templinfo["PageArg"] = name templinfo["Name"] = user.Name templinfo["WhatAbout"] = user.HTAbout templinfo["ServerMessage"] = "" @@ -2272,6 +2274,10 @@ func webhydra(w http.ResponseWriter, r *http.Request) { `, login.GetCSRF("submithonker", r), xid) msg := templates.Sprintf(`honks by honker: %s%s`, xid, xid, miniform) hydra.Srvmsg = msg + case "user": + uname := r.FormValue("uname") + honks = gethonksbyuser(uname, u != nil && u.Username == uname, wanted) + hydra.Srvmsg = templates.Sprintf("honks by user: %s", uname) default: http.NotFound(w, r) }