Parse photos
All checks were successful
the build was successful

This commit is contained in:
Peter Stuifzand 2018-12-18 20:15:19 +01:00
parent 084888880b
commit a2f76c6071
Signed by: peter
GPG Key ID: 374322D56E5209E8

View File

@ -111,7 +111,7 @@ func simplifyToItem(itemType string, item map[string][]interface{}) microsub.Ite
case "author":
author, _ := simplifyCard(v[0])
feedItem.Author = &author
case "checkin":
case "checkin", "location":
author, _ := simplifyCard(v[0])
feedItem.Checkin = &author
case "name", "published", "updated", "url", "uid", "latitude", "longitude":
@ -120,6 +120,14 @@ func simplifyToItem(itemType string, item map[string][]interface{}) microsub.Ite
*resultPtr = v[0].(string)
}
}
case "photo":
if resultPtr := itemPtr(&feedItem, k); resultPtr != nil {
for _, c := range v {
if photo, ok := c.(string); ok {
*resultPtr = append(*resultPtr, photo)
}
}
}
case "category":
if resultPtr := itemPtr(&feedItem, k); resultPtr != nil {
for _, c := range v {