Change Summary from string to []string
All checks were successful
the build was successful

This commit is contained in:
Peter Stuifzand 2018-08-19 21:48:50 +02:00
parent 1cc5bc2865
commit 52bc16436e
Signed by: peter
GPG Key ID: 374322D56E5209E8
3 changed files with 4 additions and 4 deletions

View File

@ -261,7 +261,7 @@ func FeedItems(fetcher Fetcher, fetchURL, contentType string, body io.Reader) ([
item.Content.HTML = feedItem.ContentHTML
item.Content.Text = feedItem.ContentText
item.URL = feedItem.URL
item.Summary = feedItem.Summary
item.Summary = append(item.Summary, feedItem.Summary)
item.ID = hex.EncodeToString([]byte(feedItem.ID))
item.Published = feedItem.DatePublished
@ -304,7 +304,7 @@ func FeedItems(fetcher Fetcher, fetchURL, contentType string, body io.Reader) ([
if len(item.Content.HTML) == 0 {
item.Content.HTML = feedItem.Summary
} else {
item.Summary = feedItem.Summary
item.Summary = append(item.Summary, feedItem.Summary)
}
}
item.URL = feedItem.Link

View File

@ -259,7 +259,7 @@ func MapToItem(result map[string]interface{}) microsub.Item {
if summary, e := result["summary"]; e {
if summaryString, ok := summary.(string); ok {
item.Summary = summaryString
item.Summary = append(item.Summary, summaryString)
}
}

View File

@ -70,7 +70,7 @@ type Item struct {
BookmarkOf []string `json:"bookmark-of,omitempty"`
RepostOf []string `json:"repost-of,omitempty"`
InReplyTo []string `json:"in-reply-to,omitempty"`
Summary string `json:"summary,omitempty"`
Summary []string `json:"summary,omitempty"`
Content *Content `json:"content,omitempty"`
Latitude string `json:"latitude,omitempty"`
Longitude string `json:"longitude,omitempty"`