handle objects with both name and summary
This commit is contained in:
parent
4efda0c551
commit
3562c42e3c
|
@ -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>") {
|
||||||
|
|
Loading…
Reference in New Issue