better handling of name, summary, content

This commit is contained in:
Ted Unangst 2020-01-12 01:43:31 -05:00
parent 19cb38f9a7
commit 9b415b7445
1 changed files with 7 additions and 7 deletions

View File

@ -656,17 +656,17 @@ func xonksaver(user *WhatAbout, item junk.Junk, origin string) *Honk {
dt = dt2
}
xid, _ = obj.GetString("id")
precis, _ = obj.GetString("summary")
if name, ok := obj.GetString("name"); ok {
if precis != "" {
precis = "\n" + precis
}
precis = name + precis
}
content, _ = obj.GetString("content")
if !strings.HasPrefix(content, "<p>") {
content = "<p>" + content
}
precis, _ = obj.GetString("summary")
if name, ok := obj.GetString("name"); ok {
if precis != "" {
content = precis + "<p>" + content
}
precis = name
}
if sens, _ := obj["sensitive"].(bool); sens && precis == "" {
precis = "unspecified horror"
}