all repos — honk @ 1c64afaecf82aa1dd1c1e06dcaa4161c69cb8750

my fork of honk

try harder to not deliver to self.
Ted Unangst tedu@tedunangst.com
Sat, 28 Sep 2019 17:13:57 -0400
commit

1c64afaecf82aa1dd1c1e06dcaa4161c69cb8750

parent

8cd57921cf69e376b4919193b41dfb4addc0f36e

1 files changed, 11 insertions(+), 7 deletions(-)

jump to
M activity.goactivity.go

@@ -994,17 +994,21 @@ 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 && honk.Public && box.Shared != "" { - rcpts["%"+box.Shared] = true - } else { - rcpts[a] = true - } + if a == thewholeworld || a == user.URL || strings.HasSuffix(a, "/followers") { + continue + } + box, _ := getboxes(a) + if box != nil && honk.Public && box.Shared != "" { + rcpts["%"+box.Shared] = true + } else { + rcpts[a] = true } } if honk.Public { for _, f := range getdubs(user.ID) { + if f.XID == user.URL { + continue + } box, _ := getboxes(f.XID) if box != nil && box.Shared != "" { rcpts["%"+box.Shared] = true