only pull in hidden audience if public

This commit is contained in:
Ted Unangst 2019-06-02 02:36:10 -04:00
parent 63320eaced
commit 10f35f7eb0
1 changed files with 7 additions and 1 deletions

View File

@ -826,7 +826,9 @@ func savehonk(w http.ResponseWriter, r *http.Request) {
if rid != "" {
xonk := getxonk(userinfo.UserID, rid)
if xonk != nil {
honk.Audience = append(honk.Audience, xonk.Audience...)
if xonk.Public {
honk.Audience = append(honk.Audience, xonk.Audience...)
}
convoy = xonk.Convoy
} else {
xonkaud, c := whosthere(rid)
@ -853,6 +855,10 @@ func savehonk(w http.ResponseWriter, r *http.Request) {
}
butnottooloud(honk.Audience)
honk.Audience = oneofakind(honk.Audience)
if len(honk.Audience) == 0 {
log.Printf("honk to nowhere")
return
}
honk.Public = !keepitquiet(honk.Audience)
noise = obfusbreak(noise)
honk.Noise = noise