allow attributedto to be object

This commit is contained in:
Ted Unangst 2019-07-20 22:45:43 -04:00
parent ad4a21d642
commit a53f9b7917
1 changed files with 7 additions and 0 deletions

View File

@ -446,6 +446,13 @@ func extractattrto(obj junk.Junk) string {
if who != "" {
return who
}
o, ok := obj.GetMap("attributedTo")
if ok {
id, ok := o.GetString("id")
if ok {
return id
}
}
arr, _ := obj.GetArray("attributedTo")
for _, a := range arr {
o, ok := a.(junk.Junk)