This commit is contained in:
parent
118b072f38
commit
2ede21bfda
|
|
@ -255,9 +255,13 @@ func MapToItem(result map[string]interface{}) microsub.Item {
|
||||||
// TODO: Check how to improve this
|
// TODO: Check how to improve this
|
||||||
|
|
||||||
if value, e := result["like-of"]; e {
|
if value, e := result["like-of"]; e {
|
||||||
for _, v := range value.([]interface{}) {
|
if likeOf, ok := value.(string); ok {
|
||||||
if u, ok := v.(string); ok {
|
item.LikeOf = append(item.LikeOf, likeOf)
|
||||||
item.LikeOf = append(item.LikeOf, u)
|
} else if likeOfs, ok := value.([]interface{}); ok {
|
||||||
|
for _, v := range likeOfs {
|
||||||
|
if u, ok := v.(string); ok {
|
||||||
|
item.LikeOf = append(item.LikeOf, u)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -275,9 +279,13 @@ func MapToItem(result map[string]interface{}) microsub.Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
if value, e := result["bookmark-of"]; e {
|
if value, e := result["bookmark-of"]; e {
|
||||||
for _, v := range value.([]interface{}) {
|
if bookmark, ok := value.(string); ok {
|
||||||
if u, ok := v.(string); ok {
|
item.BookmarkOf = append(item.BookmarkOf, bookmark)
|
||||||
item.BookmarkOf = append(item.BookmarkOf, u)
|
} else if bookmarks, ok := value.([]interface{}); ok {
|
||||||
|
for _, v := range bookmarks {
|
||||||
|
if u, ok := v.(string); ok {
|
||||||
|
item.BookmarkOf = append(item.BookmarkOf, u)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user