all repos — honk @ b9c093e48e5c2491e142f9f796bf7bf178e11fe2

my fork of honk

people really want to believe that deletion can work.
i think it's dangerous to perpetuate this belief,
but i'm not interested in being the internet archive either.
Ted Unangst tedu@tedunangst.com
Fri, 03 May 2019 13:42:39 -0400
commit

b9c093e48e5c2491e142f9f796bf7bf178e11fe2

parent

a4e8ace5c69a6709411bb2e90e130044b95b06b3

7 files changed, 26 insertions(+), 29 deletions(-)

jump to
M activity.goactivity.go

@@ -680,22 +680,14 @@ j["cc"] = h.Audience[1:]

} switch h.What { - case "zonk": - fallthrough case "tonk": fallthrough case "honk": j["type"] = "Create" - if h.What == "zonk" { - j["type"] = "Delete" - } jo = NewJunk() jo["id"] = user.URL + "/h/" + h.XID jo["type"] = "Note" - if h.What == "zonk" { - jo["type"] = "Tombstone" - } jo["published"] = dt jo["url"] = user.URL + "/h/" + h.XID jo["attributedTo"] = user.URL

@@ -756,6 +748,9 @@ j["object"] = jo

case "bonk": j["type"] = "Announce" j["object"] = h.XID + case "zonk": + j["type"] = "Delete" + j["object"] = user.URL + "/h/" + h.XID } return j, jo
M docs/manual.txtdocs/manual.txt

@@ -26,9 +26,8 @@

-- zonking You can zonk anything you like (or dislike), either your own honk or -those of others that you're tired of seeing. This reduces its visibility, but -doesn't attempt to delete it, which is infeasible. -It's more like disavow or disregard. +those of others that you're tired of seeing. Be advised that deletion +works poorly in a federated environment. It's more like please disregard. The killzone supports blocking unwanted contacts. One may block an actor (zonker), a domain (zurl), or thread (zonvoy).
M honk.gohonk.go

@@ -711,9 +711,6 @@ db := opendatabase()

var ids []string hmap := make(map[int64]*Honk) for _, h := range honks { - if h.What == "zonk" { - continue - } ids = append(ids, fmt.Sprintf("%d", h.ID)) hmap[h.ID] = h }

@@ -814,7 +811,20 @@

log.Printf("zonking %s %s", wherefore, what) userinfo := login.GetUserInfo(r) if wherefore == "zonk" { + xonk := getxonk(userinfo.Username, what) stmtZonkIt.Exec(userinfo.UserID, what) + if xonk != nil && xonk.Honker == "" { + zonk := Honk{ + What: "zonk", + XID: xonk.XID, + Date: time.Now().UTC(), + Audience: oneofakind(xonk.Audience), + } + + user, _ := butwhatabout(userinfo.Username) + log.Printf("announcing deleted honk: %s", what) + go honkworldwide(user, &zonk) + } } else { _, err := stmtSaveZonker.Exec(userinfo.UserID, what, wherefore) if err != nil {

@@ -1331,7 +1341,8 @@ 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 = ? and userid = ?") + stmtDeleteHonk = preparetodie(db, "delete from honks where xid = ? and honker = ? and userid = ?") + stmtZonkIt = preparetodie(db, "delete from honks where userid = ? and xid = ?") 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 = ?")

@@ -1340,7 +1351,6 @@ stmtAddDoover = preparetodie(db, "insert into doovers (dt, tries, username, rcpt, msg) values (?, ?, ?, ?, ?)")

stmtGetDoovers = preparetodie(db, "select dooverid, dt from doovers") stmtLoadDoover = preparetodie(db, "select tries, username, rcpt, msg from doovers where dooverid = ?") stmtZapDoover = preparetodie(db, "delete from doovers where dooverid = ?") - stmtZonkIt = preparetodie(db, "update honks set what = 'zonk' where userid = ? and xid = ?") stmtThumbBiters = preparetodie(db, "select userid, name, wherefore from zonkers where (wherefore = 'zonker' or wherefore = 'zurl')") stmtSaveZonker = preparetodie(db, "insert into zonkers (userid, name, wherefore) values (?, ?, ?)") stmtGetBoxes = preparetodie(db, "select ibox, obox, sbox from xonkers where xid = ?")
M upgradedb.goupgradedb.go

@@ -65,6 +65,10 @@ doordie(db, "update honkers set combos = ''")

doordie(db, "update config set value = 5 where key = 'dbversion'") fallthrough case 5: + doordie(db, "delete from honks where what = 'zonk'") + doordie(db, "update config set value = 6 where key = 'dbversion'") + fallthrough + case 6: default: log.Fatalf("can't upgrade unknown version %d", dbversion) }
M util.goutil.go

@@ -70,7 +70,7 @@

var alreadyopendb *sql.DB var dbname = "honk.db" var stmtConfig *sql.Stmt -var myVersion = 5 +var myVersion = 6 func initdb() { schema, err := ioutil.ReadFile("schema.sql")
M views/honk.htmlviews/honk.html

@@ -25,7 +25,7 @@ {{ end }}

{{ end }} </div> {{ end }} -{{ if and .BonkCSRF (not (eq .Honk.What "zonked")) }} +{{ if .BonkCSRF }} <p> <div> {{ if not .Honk.Privacy }}
M views/style.cssviews/style.css

@@ -140,17 +140,6 @@ }

.tonked .noise a { color: #aab; } -.zonked { - color: #a79; -} -.zonked .noise { - color: #a79; - font-size: 0.8em; - text-decoration: line-through; -} -.zonked .noise a { - color: #a79; -} .limited { border: 1px solid #a04; color: #a79;