only delete honks for user that receives deletion
This commit is contained in:
parent
9a4e2900ac
commit
d728004cad
|
@ -247,7 +247,7 @@ func needxonk(user *WhatAbout, x *Honk) bool {
|
|||
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)
|
||||
}
|
||||
|
|
2
honk.go
2
honk.go
|
@ -1208,7 +1208,7 @@ func prepareStatements(db *sql.DB) {
|
|||
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 = ?")
|
||||
|
|
Loading…
Reference in New Issue