From 634d74d139b7079b8ecfc81d5f04c25fb9aa0638 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Fri, 25 Aug 2023 00:30:19 -0400 Subject: [PATCH] a very plain text accessor that's helpful for debugging --- database.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/database.go b/database.go index 1647a6e..afbf133 100644 --- a/database.go +++ b/database.go @@ -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)