Simplify summary even more
Some checks failed
the build failed

This commit is contained in:
Peter Stuifzand 2018-08-19 17:02:16 +02:00
parent 64730b0e50
commit 4d08d18d62
Signed by: peter
GPG Key ID: 374322D56E5209E8

View File

@ -49,10 +49,8 @@ func simplify(itemType string, item map[string][]interface{}, author map[string]
} else if k == "summary" { } else if k == "summary" {
if content, ok := v[0].(map[string]interface{}); ok { if content, ok := v[0].(map[string]interface{}); ok {
if text, e := content["value"]; e { if text, e := content["value"]; e {
delete(content, "value") feedItem[k] = text
content["text"] = text
} }
feedItem[k] = content
} else if summary, ok := v[0].(string); ok { } else if summary, ok := v[0].(string); ok {
feedItem[k] = summary feedItem[k] = summary
} }
@ -260,7 +258,9 @@ func MapToItem(result map[string]interface{}) microsub.Item {
} }
if summary, e := result["summary"]; e { if summary, e := result["summary"]; e {
item.Summary = summary.(string) if summaryString, ok := summary.(string); ok {
item.Summary = summaryString
}
} }
if content, e := result["content"]; e { if content, e := result["content"]; e {