better handling of attachments during edit
Ted Unangst tedu@tedunangst.com
Tue, 17 Sep 2019 10:44:00 -0400
2 files changed,
6 insertions(+),
0 deletions(-)
M
activity.go
→
activity.go
@@ -713,6 +713,8 @@ }
prev.Noise = xonk.Noise prev.Precis = xonk.Precis prev.Date = xonk.Date + prev.Donks = xonk.Donks + prev.Onts = xonk.Onts updatehonk(prev) return nil }
M
web.go
→
web.go
@@ -847,6 +847,7 @@ noise = honk.Precis + "\n\n" + noise
} honks := []*Honk{honk} + donksforhonks(honks) reverbolate(u.UserID, honks) templinfo := getInfo(r) templinfo["HonkCSRF"] = login.GetCSRF("honkhonk", r)@@ -854,6 +855,9 @@ templinfo["Honks"] = honks
templinfo["Noise"] = noise templinfo["ServerMessage"] = "honk edit" templinfo["UpdateXID"] = honk.XID + if len(honk.Donks) > 0 { + templinfo["SavedFile"] = honk.Donks[0].XID + } err := readviews.Execute(w, "honkpage.html", templinfo) if err != nil { log.Print(err)