handle objects with both name and summary

This commit is contained in:
Ted Unangst 2019-12-24 08:17:06 -05:00
parent 4efda0c551
commit 3562c42e3c
1 changed files with 5 additions and 2 deletions

View File

@ -660,8 +660,11 @@ func xonksaver(user *WhatAbout, item junk.Junk, origin string) *Honk {
} }
xid, _ = obj.GetString("id") xid, _ = obj.GetString("id")
precis, _ = obj.GetString("summary") precis, _ = obj.GetString("summary")
if precis == "" { if name, ok := obj.GetString("name"); ok {
precis, _ = obj.GetString("name") if precis != "" {
precis = "\n" + precis
}
precis = name + precis
} }
content, _ = obj.GetString("content") content, _ = obj.GetString("content")
if !strings.HasPrefix(content, "<p>") { if !strings.HasPrefix(content, "<p>") {