better handling of name, summary, content
This commit is contained in:
parent
19cb38f9a7
commit
9b415b7445
14
activity.go
14
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, "<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"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue