a very plain text accessor that's helpful for debugging

This commit is contained in:
Ted Unangst 2023-08-25 00:30:19 -04:00
parent 93a79455d2
commit 634d74d139
1 changed files with 11 additions and 1 deletions

View File

@ -790,9 +790,19 @@ func loadchatter(userid int64) []*Chatter {
}
func (honk *Honk) Plain() string {
return honktoplain(honk, false)
}
func (honk *Honk) VeryPlain() string {
return honktoplain(honk, true)
}
func honktoplain(honk *Honk, very bool) string {
var plain []string
var filt htfilter.Filter
filt.WithLinks = true
if !very {
filt.WithLinks = true
}
if honk.Precis != "" {
t, _ := filt.TextOnly(honk.Precis)
plain = append(plain, t)