try to get original audience for remote replies

master
Ted Unangst 5 years ago
parent 33bf469807
commit 8d966a1d50

@ -327,6 +327,15 @@ func peeppeep() {
}
}
func whosthere(xid string) []string {
obj, err := GetJunk(xid)
if err != nil {
log.Printf("error getting remote xonk: %s", err)
return nil
}
return newphone(nil, obj)
}
func newphone(a []string, obj map[string]interface{}) []string {
for _, addr := range []string{"to", "cc", "attributedTo"} {
who, _ := jsongetstring(obj, addr)

@ -870,6 +870,9 @@ func savehonk(w http.ResponseWriter, r *http.Request) {
xonk := getxonk("", rid)
if xonk != nil {
honk.Audience = append(honk.Audience, xonk.Audience...)
} else {
xonkaud := whosthere(rid)
honk.Audience = append(honk.Audience, xonkaud...)
}
}
honk.Audience = oneofakind(honk.Audience)

Loading…
Cancel
Save