Compare commits
2 Commits
9e6765bf8e
...
d7834ebf53
| Author | SHA1 | Date | |
|---|---|---|---|
| d7834ebf53 | |||
| 78cace26d9 |
|
|
@ -261,7 +261,6 @@ 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
|
||||
|
||||
|
|
@ -303,8 +302,6 @@ 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
|
||||
|
|
@ -331,7 +328,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.Type = ""
|
||||
v.Author = nil
|
||||
items[i] = v
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -257,12 +257,6 @@ 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