only delete honks for user that receives deletion
Ted Unangst tedu@tedunangst.com
Wed, 24 Apr 2019 17:34:58 -0400
2 files changed,
2 insertions(+),
2 deletions(-)
M
activity.go
→
activity.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.go
→
honk.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 = ?")