From 9b415b744575418d852e06f41dd7e319a3375832 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Sun, 12 Jan 2020 01:43:31 -0500 Subject: [PATCH] better handling of name, summary, content --- activity.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/activity.go b/activity.go index 1943b3b..6e976e4 100644 --- a/activity.go +++ b/activity.go @@ -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, "

") { content = "

" + content } + precis, _ = obj.GetString("summary") + if name, ok := obj.GetString("name"); ok { + if precis != "" { + content = precis + "

" + content + } + precis = name + } if sens, _ := obj["sensitive"].(bool); sens && precis == "" { precis = "unspecified horror" }