Compare commits
No commits in common. "d7834ebf53739d2f2a26ea2f9379776fb4b3e5d6" and "9e6765bf8e20d93c78cd0fc819e6e3248c5c3942" have entirely different histories.
d7834ebf53
...
9e6765bf8e
|
|
@ -261,6 +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 = append(item.Summary, feedItem.Summary)
|
||||
item.ID = hex.EncodeToString([]byte(feedItem.ID))
|
||||
item.Published = feedItem.DatePublished
|
||||
|
||||
|
|
@ -302,6 +303,8 @@ func FeedItems(fetcher Fetcher, fetchURL, contentType string, body io.Reader) ([
|
|||
if len(feedItem.Summary) > 0 {
|
||||
if len(item.Content.HTML) == 0 {
|
||||
item.Content.HTML = feedItem.Summary
|
||||
} else {
|
||||
item.Summary = append(item.Summary, feedItem.Summary)
|
||||
}
|
||||
}
|
||||
item.URL = feedItem.Link
|
||||
|
|
@ -328,7 +331,7 @@ func FeedItems(fetcher Fetcher, fetchURL, contentType string, body io.Reader) ([
|
|||
for i, v := range items {
|
||||
// Clear type of author, when other fields also aren't set
|
||||
if v.Author != nil && v.Author.Name == "" && v.Author.Photo == "" && v.Author.URL == "" {
|
||||
v.Author = nil
|
||||
v.Author.Type = ""
|
||||
items[i] = v
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -257,6 +257,12 @@ func MapToItem(result map[string]interface{}) microsub.Item {
|
|||
}
|
||||
}
|
||||
|
||||
if summary, e := result["summary"]; e {
|
||||
if summaryString, ok := summary.(string); ok {
|
||||
item.Summary = append(item.Summary, summaryString)
|
||||
}
|
||||
}
|
||||
|
||||
if content, e := result["content"]; e {
|
||||
itemContent := µsub.Content{}
|
||||
set := false
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user