a very plain text accessor that's helpful for debugging
This commit is contained in:
parent
93a79455d2
commit
634d74d139
10
database.go
10
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
|
||||
if !very {
|
||||
filt.WithLinks = true
|
||||
}
|
||||
if honk.Precis != "" {
|
||||
t, _ := filt.TextOnly(honk.Precis)
|
||||
plain = append(plain, t)
|
||||
|
|
Loading…
Reference in New Issue