oops, owner field doesn't exist.
only check attributedto for collections.
This commit is contained in:
parent
846e9820e9
commit
7a332ead41
|
@ -1714,6 +1714,7 @@ func investigate(name string) (*SomeThing, error) {
|
||||||
func somethingabout(obj junk.Junk) (*SomeThing, error) {
|
func somethingabout(obj junk.Junk) (*SomeThing, error) {
|
||||||
info := new(SomeThing)
|
info := new(SomeThing)
|
||||||
t, _ := obj.GetString("type")
|
t, _ := obj.GetString("type")
|
||||||
|
isowned := false
|
||||||
switch t {
|
switch t {
|
||||||
case "Person":
|
case "Person":
|
||||||
fallthrough
|
fallthrough
|
||||||
|
@ -1726,6 +1727,7 @@ func somethingabout(obj junk.Junk) (*SomeThing, error) {
|
||||||
case "Service":
|
case "Service":
|
||||||
info.What = SomeActor
|
info.What = SomeActor
|
||||||
case "OrderedCollection":
|
case "OrderedCollection":
|
||||||
|
isowned = true
|
||||||
fallthrough
|
fallthrough
|
||||||
case "Collection":
|
case "Collection":
|
||||||
info.What = SomeCollection
|
info.What = SomeCollection
|
||||||
|
@ -1737,8 +1739,7 @@ func somethingabout(obj junk.Junk) (*SomeThing, error) {
|
||||||
if info.Name == "" {
|
if info.Name == "" {
|
||||||
info.Name, _ = obj.GetString("name")
|
info.Name, _ = obj.GetString("name")
|
||||||
}
|
}
|
||||||
info.Owner, _ = obj.GetString("owner")
|
if isowned {
|
||||||
if info.Owner == "" {
|
|
||||||
info.Owner, _ = obj.GetString("attributedTo")
|
info.Owner, _ = obj.GetString("attributedTo")
|
||||||
}
|
}
|
||||||
if info.Owner == "" {
|
if info.Owner == "" {
|
||||||
|
|
Loading…
Reference in New Issue