try to get original audience for remote replies
This commit is contained in:
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 {
|
func newphone(a []string, obj map[string]interface{}) []string {
|
||||||
for _, addr := range []string{"to", "cc", "attributedTo"} {
|
for _, addr := range []string{"to", "cc", "attributedTo"} {
|
||||||
who, _ := jsongetstring(obj, addr)
|
who, _ := jsongetstring(obj, addr)
|
||||||
|
|
3
honk.go
3
honk.go
|
@ -870,6 +870,9 @@ func savehonk(w http.ResponseWriter, r *http.Request) {
|
||||||
xonk := getxonk("", rid)
|
xonk := getxonk("", rid)
|
||||||
if xonk != nil {
|
if xonk != nil {
|
||||||
honk.Audience = append(honk.Audience, xonk.Audience...)
|
honk.Audience = append(honk.Audience, xonk.Audience...)
|
||||||
|
} else {
|
||||||
|
xonkaud := whosthere(rid)
|
||||||
|
honk.Audience = append(honk.Audience, xonkaud...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
honk.Audience = oneofakind(honk.Audience)
|
honk.Audience = oneofakind(honk.Audience)
|
||||||
|
|
Loading…
Reference in New Issue