all repos — honk @ 04263a1896914ce91f3984b2c4b69e05c3ac24db

my fork of honk

if update without create, just create
Ted Unangst tedu@tedunangst.com
Thu, 10 Oct 2019 19:12:34 -0400
commit

04263a1896914ce91f3984b2c4b69e05c3ac24db

parent

333be2b9bcd16c1d7d96e285a9fdfdb6342c568d

1 files changed, 11 insertions(+), 9 deletions(-)

jump to
M activity.goactivity.go

@@ -827,16 +827,18 @@ log.Printf("something has changed! %s", xonk.XID)

prev := getxonk(user.ID, xonk.XID) if prev == nil { log.Printf("didn't find old version for update: %s", xonk.XID) - return nil + isUpdate = false + } else { + prev.Noise = xonk.Noise + prev.Precis = xonk.Precis + prev.Date = xonk.Date + prev.Donks = xonk.Donks + prev.Onts = xonk.Onts + prev.Place = xonk.Place + updatehonk(prev) } - prev.Noise = xonk.Noise - prev.Precis = xonk.Precis - prev.Date = xonk.Date - prev.Donks = xonk.Donks - prev.Onts = xonk.Onts - prev.Place = xonk.Place - updatehonk(prev) - } else if needxonk(user, &xonk) { + } + if !isUpdate && needxonk(user, &xonk) { if rid != "" { if needxonkid(user, rid) { goingup++