all messages matter again
Ted Unangst tedu@tedunangst.com
Mon, 12 Jun 2023 13:44:03 -0400
3 files changed,
11 insertions(+),
25 deletions(-)
M
activity.go
→
activity.go
@@ -1149,7 +1149,7 @@ j["to"] = actor
j["published"] = time.Now().UTC().Format(time.RFC3339) j["object"] = req - deliverate(0, user.ID, actor, j.ToBytes(), true) + deliverate(0, user.ID, actor, j.ToBytes()) } func itakeitallback(user *WhatAbout, xid string, owner string, folxid string) {@@ -1168,7 +1168,7 @@ f["object"] = xid
j["object"] = f j["published"] = time.Now().UTC().Format(time.RFC3339) - deliverate(0, user.ID, owner, j.ToBytes(), true) + deliverate(0, user.ID, owner, j.ToBytes()) } func subsub(user *WhatAbout, xid string, owner string, folxid string) {@@ -1185,7 +1185,7 @@ j["to"] = owner
j["object"] = xid j["published"] = time.Now().UTC().Format(time.RFC3339) - deliverate(0, user.ID, owner, j.ToBytes(), true) + deliverate(0, user.ID, owner, j.ToBytes()) } func activatedonks(donks []*Donk) []junk.Junk {@@ -1495,7 +1495,7 @@
rcpts := make(map[string]bool) rcpts[ch.Target] = true for a := range rcpts { - go deliverate(0, user.ID, a, msg, true) + go deliverate(0, user.ID, a, msg) } }@@ -1534,25 +1534,13 @@ }
} } for a := range rcpts { - go deliverate(0, user.ID, a, msg, doesitmatter(honk.What)) + go deliverate(0, user.ID, a, msg) } if honk.Public && len(honk.Onts) > 0 { collectiveaction(honk) } } -func doesitmatter(what string) bool { - switch what { - case "ack": - return false - case "react": - return false - case "deack": - return false - } - return true -} - func collectiveaction(honk *Honk) { user := getserveruser() for _, ont := range honk.Onts {@@ -1579,7 +1567,7 @@ }
} msg := j.ToBytes() for a := range rcpts { - go deliverate(0, user.ID, a, msg, false) + go deliverate(0, user.ID, a, msg) } } }@@ -1893,7 +1881,7 @@ rcpts[f.XID] = true
} } for a := range rcpts { - go deliverate(0, user.ID, a, msg, false) + go deliverate(0, user.ID, a, msg) } }
M
deliverator.go
→
deliverator.go
@@ -71,7 +71,7 @@ }
var garage = gate.NewLimiter(40) -func deliverate(goarounds int64, userid int64, rcpt string, msg []byte, prio bool) { +func deliverate(goarounds int64, userid int64, rcpt string, msg []byte) { garage.Start() defer garage.Finish()@@ -98,9 +98,7 @@ }
err := PostMsg(ki.keyname, ki.seckey, inbox, msg) if err != nil { ilog.Printf("failed to post json to %s: %s", inbox, err) - if prio { - sayitagain(goarounds+1, userid, rcpt, msg) - } + sayitagain(goarounds+1, userid, rcpt, msg) return } }@@ -163,7 +161,7 @@ elog.Printf("error deleting doover: %s", err)
continue } ilog.Printf("redeliverating %s try %d", rcpt, goarounds) - deliverate(goarounds, userid, rcpt, msg, true) + deliverate(goarounds, userid, rcpt, msg) } else if d.When.Before(nexttime) { nexttime = d.When }
M
web.go
→
web.go
@@ -2422,7 +2422,7 @@ public := r.FormValue("public") == "1"
rcpts := boxuprcpts(user, r.Form["rcpt"], public) msg := []byte(r.FormValue("msg")) for rcpt := range rcpts { - go deliverate(0, userid, rcpt, msg, true) + go deliverate(0, userid, rcpt, msg) } case "gethonkers": j := junk.New()