From 5ef64966f38ab68ae3ce2b50d4606f5b66ebb522 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Fri, 3 May 2019 14:09:08 -0400 Subject: [PATCH] don't address to followers while the posts go on the wrong timelines --- fun.go | 9 +++++++++ honk.go | 1 + 2 files changed, 10 insertions(+) diff --git a/fun.go b/fun.go index 9c2ba57..2003b4e 100644 --- a/fun.go +++ b/fun.go @@ -231,6 +231,15 @@ func prepend(s string, x []string) []string { return append([]string{s}, x...) } +// pleroma leaks followers addressed posts to followers +func butnottooloud(aud []string) { + for i, a := range aud { + if strings.HasSuffix(a, "/followers") { + aud[i] = "" + } + } +} + func oneofakind(a []string) []string { var x []string for n, s := range a { diff --git a/honk.go b/honk.go index c25bd11..6d67ed8 100644 --- a/honk.go +++ b/honk.go @@ -877,6 +877,7 @@ func savehonk(w http.ResponseWriter, r *http.Request) { if convoy == "" { convoy = "data:,electrichonkytonk-" + xfiltrate() } + butnottooloud(honk.Audience) honk.Audience = oneofakind(honk.Audience) noise = obfusbreak(noise) honk.Noise = noise