all repos — honk @ de456f02f96590b1431fc37a99cd84f7c2e3ccd3

my fork of honk

all messages matter again
Ted Unangst tedu@tedunangst.com
Mon, 12 Jun 2023 13:44:03 -0400
commit

de456f02f96590b1431fc37a99cd84f7c2e3ccd3

parent

5f4a24db03e78c715dafc9399b38bf45694ed699

3 files changed, 11 insertions(+), 25 deletions(-)

jump to
M activity.goactivity.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.godeliverator.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.goweb.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()