all repos — honk @ b5501c4ee6ece99e8f638b9efd566f984ad6ac69

my fork of honk

only delete honks for user that receives deletion
Ted Unangst tedu@tedunangst.com
Wed, 24 Apr 2019 17:34:58 -0400
commit

b5501c4ee6ece99e8f638b9efd566f984ad6ac69

parent

98d43d7a370a4302641cd69fcfa0a885c69fd0c7

2 files changed, 2 insertions(+), 2 deletions(-)

jump to
M activity.goactivity.go

@@ -247,7 +247,7 @@

func savexonk(user *WhatAbout, x *Honk) { if x.What == "eradicate" { log.Printf("eradicating %s by %s", x.RID, x.Honker) - _, err := stmtDeleteHonk.Exec(x.RID, x.Honker) + _, err := stmtDeleteHonk.Exec(x.RID, x.Honker, user.ID) if err != nil { log.Printf("error eradicating: %s", err) }
M honk.gohonk.go

@@ -1208,7 +1208,7 @@ stmtSaveHonk = preparetodie(db, "insert into honks (userid, what, honker, xid, rid, dt, url, audience, noise, convoy, whofore) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)")

stmtFileData = preparetodie(db, "select media, content from files where xid = ?") stmtFindXonk = preparetodie(db, "select honkid from honks where userid = ? and xid = ?") stmtSaveDonk = preparetodie(db, "insert into donks (honkid, fileid) values (?, ?)") - stmtDeleteHonk = preparetodie(db, "update honks set what = 'zonk' where xid = ? and honker = ?") + stmtDeleteHonk = preparetodie(db, "update honks set what = 'zonk' where xid = ? and honker = ? and userid = ?") stmtFindFile = preparetodie(db, "select fileid from files where url = ?") stmtSaveFile = preparetodie(db, "insert into files (xid, name, url, media, content) values (?, ?, ?, ?, ?)") stmtWhatAbout = preparetodie(db, "select userid, username, displayname, about, pubkey from users where username = ?")