Add summary field
All checks were successful
the build was successful

This commit is contained in:
Peter Stuifzand 2018-12-29 10:34:51 +01:00
parent 0c88e90853
commit 877a87e21d
Signed by: peter
GPG Key ID: 374322D56E5209E8
2 changed files with 5 additions and 2 deletions

View File

@ -114,10 +114,12 @@ func simplifyToItem(itemType string, item map[string][]interface{}) microsub.Ite
case "checkin", "location":
author, _ := simplifyCard(v[0])
feedItem.Checkin = &author
case "name", "published", "updated", "url", "uid", "latitude", "longitude":
case "name", "published", "updated", "url", "uid", "latitude", "longitude", "summary":
if resultPtr := getScalarPtr(&feedItem, k); resultPtr != nil {
if len(v) >= 1 {
*resultPtr = v[0].(string)
if value, ok := v[0].(string); ok {
*resultPtr = value
}
}
}
case "photo":

View File

@ -71,6 +71,7 @@ type Item struct {
RepostOf []string `json:"repost-of,omitempty" mf2:"repost-of"`
InReplyTo []string `json:"in-reply-to,omitempty" mf2:"in-reply-to"`
Content *Content `json:"content,omitempty" mf2:"content"`
Summary string `json:"summary,omitempty" mf2:"summary"`
Latitude string `json:"latitude,omitempty" mf2:"latitude"`
Longitude string `json:"longitude,omitempty" mf2:"longitude"`
Checkin *Card `json:"checkin,omitempty" mf2:"checkin"`