all repos — honk @ 17296460cb0345a842fdaae7ce0c913133ad88eb

my fork of honk

refine delivery some more
Ted Unangst tedu@tedunangst.com
Tue, 16 Apr 2019 20:14:24 -0400
commit

17296460cb0345a842fdaae7ce0c913133ad88eb

parent

715785e8fe1b26f3402b2eb3d67dbdb7d43dccb1

1 files changed, 13 insertions(+), 9 deletions(-)

jump to
M activity.goactivity.go

@@ -607,17 +607,23 @@ return j, jo

} func honkworldwide(user *WhatAbout, honk *Honk) { - rcpts := make(map[string]bool) - for _, a := range honk.Audience { - if a != thewholeworld && a != user.URL { - rcpts[a] = true - } - } jonk, _ := jonkjonk(user, honk) jonk["@context"] = itiswhatitis var buf bytes.Buffer WriteJunk(&buf, jonk) msg := buf.Bytes() + + rcpts := make(map[string]bool) + for _, a := range honk.Audience { + if a != thewholeworld && a != user.URL && !strings.HasSuffix(a, "/followers") { + box, _ := getboxes(a) + if box != nil && box.Shared != "" { + rcpts["%"+box.Shared] = true + } else { + rcpts[a] = true + } + } + } for _, f := range getdubs(user.ID) { box, _ := getboxes(f.XID) if box != nil && box.Shared != "" {

@@ -627,9 +633,7 @@ rcpts[f.XID] = true

} } for a := range rcpts { - if !strings.HasSuffix(a, "/followers") { - deliverate(0, user.Name, a, msg) - } + deliverate(0, user.Name, a, msg) } }