handle objects with both name and summary
Ted Unangst tedu@tedunangst.com
Tue, 24 Dec 2019 08:17:06 -0500
1 files changed,
5 insertions(+),
2 deletions(-)
jump to
M
activity.go
→
activity.go
@@ -660,8 +660,11 @@ dt = dt2
} xid, _ = obj.GetString("id") precis, _ = obj.GetString("summary") - if precis == "" { - precis, _ = obj.GetString("name") + if name, ok := obj.GetString("name"); ok { + if precis != "" { + precis = "\n" + precis + } + precis = name + precis } content, _ = obj.GetString("content") if !strings.HasPrefix(content, "<p>") {