a very plain text accessor that's helpful for debugging
This commit is contained in:
parent
93a79455d2
commit
634d74d139
12
database.go
12
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)
|
||||
|
|
Loading…
Reference in New Issue