only need to load donks in one case of getxonk

This commit is contained in:
Ted Unangst 2019-05-05 14:03:12 -04:00
parent 2b390a6b92
commit 8143593f8c

View file

@ -524,6 +524,7 @@ func showhonk(w http.ResponseWriter, r *http.Request) {
http.NotFound(w, r) http.NotFound(w, r)
return return
} }
donksforhonks([]*Honk{&h})
if friendorfoe(r.Header.Get("Accept")) { if friendorfoe(r.Header.Get("Accept")) {
_, j := jonkjonk(user, h) _, j := jonkjonk(user, h)
j["@context"] = itiswhatitis j["@context"] = itiswhatitis
@ -632,7 +633,6 @@ func getxonk(userid int64, xid string) *Honk {
} }
h.Date, _ = time.Parse(dbtimeformat, dt) h.Date, _ = time.Parse(dbtimeformat, dt)
h.Audience = strings.Split(aud, " ") h.Audience = strings.Split(aud, " ")
donksforhonks([]*Honk{&h})
return &h return &h
} }